userId = $userId; $this->event = $event; $this->body = $body; } /** * @return int */ public function getUserId(): int { return $this->userId; } /** * @return string */ public function getEvent(): string { return $this->event; } /** * @return array */ public function getBody(): array { return $this->body; } /** * @return array */ #[ArrayShape(['userId' => "int", 'event' => "string", 'body' => "array"])] public function jsonSerialize(): array { return [ 'userId' => $this->userId, 'event' => $this->event, 'body' => $this->body ]; } }