From e2a739eeffc52b03efbf722da142321f910052c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 28 Aug 2023 15:52:26 +0200 Subject: [PATCH] Fix strong typing on some entities's methods: allow null values --- src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php | 2 +- .../ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 499502d76..4d70cbf12 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -716,7 +716,7 @@ class AccompanyingPeriod implements ; } - public function getCreatedAt(): DateTimeInterface + public function getCreatedAt(): ?DateTimeInterface { return $this->createdAt; } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php index 48479782a..c9f1e9279 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php @@ -96,7 +96,7 @@ class Resource /** * @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; }