userId); } public function jsonSerialize(): array { return [ 'gameId' => $this->gameId, 'userId' => $this->userId, 'messageTime' => $this->messageTime->toJSON(), 'message' => $this->message, ]; } }