diff --git a/src/Entity/Accounting/Accounting.php b/src/Entity/Accounting/Accounting.php index 39e0073..3bf5d75 100644 --- a/src/Entity/Accounting/Accounting.php +++ b/src/Entity/Accounting/Accounting.php @@ -91,10 +91,16 @@ class Accounting case Tipjar::class: return $this->getTipjar(); } + + return null; } - public function setOwner(AccountingOwnerInterface $owner): static + public function setOwner(?AccountingOwnerInterface $owner): static { + if ($owner === null) { + return $this; + } + $this->setOwnerClass($owner::class); switch ($this->getOwnerClass()) {