Fix strong typing on some entities's methods: allow null values

This commit is contained in:
Julien Fastré 2023-08-28 15:52:26 +02:00
parent 847fd71364
commit e2a739eeff
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 2 additions and 2 deletions

View File

@ -716,7 +716,7 @@ class AccompanyingPeriod implements
; ;
} }
public function getCreatedAt(): DateTimeInterface public function getCreatedAt(): ?DateTimeInterface
{ {
return $this->createdAt; return $this->createdAt;
} }

View File

@ -96,7 +96,7 @@ class Resource
/** /**
* @Groups({"read"}) * @Groups({"read"})
*/ */
public function getResource(): \Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty public function getResource(): \Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty|null
{ {
return $this->person ?? $this->thirdParty; return $this->person ?? $this->thirdParty;
} }