id; } public function getThirdparty(): ?ThirdParty { return $this->thirdparty; } public function setThirdparty(?ThirdParty $thirdparty): self { $this->thirdparty = $thirdparty; if (null !== $thirdparty) { $this->user = null; } return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; if (null !== $user) { $this->thirdparty = null; } return $this; } public function getEvent(): ?Event { return $this->event; } public function setEvent(?Event $event): self { $this->event = $event; return $this; } public function getAnimator(): User|ThirdParty|null { return $this->user ?? $this->thirdparty; } public function setAnimator(User|ThirdParty|null $animator): self { if ($animator instanceof User) { $this->setUser($animator); } elseif ($animator instanceof ThirdParty) { $this->setThirdparty($animator); } else { $this->user = null; $this->thirdparty = null; } return $this; } public function isUser(): bool { return null !== $this->user; } public function isThirdParty(): bool { return null !== $this->thirdparty; } }