public function __construct(UserId $userId) { $this->userId = $userId; $this->occurredOn = new \DateTimeImmutable(); }