mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Upgrade code from 146 to new standards
This commit is contained in:
@@ -977,7 +977,7 @@ class AccompanyingPeriod implements
|
||||
/**
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
public function getRequestor(): Person|ThirdParty|null
|
||||
public function getRequestor(): null|Person|ThirdParty
|
||||
{
|
||||
return $this->requestorPerson ?? $this->requestorThirdParty;
|
||||
}
|
||||
|
@@ -96,7 +96,7 @@ class Resource
|
||||
/**
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
public function getResource(): \Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty|null
|
||||
public function getResource(): null|\Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty
|
||||
{
|
||||
return $this->person ?? $this->thirdParty;
|
||||
}
|
||||
|
@@ -619,7 +619,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
* @return true | array True if the accompanying periods are not collapsing,
|
||||
* an array with data for displaying the error
|
||||
*/
|
||||
public function checkAccompanyingPeriodsAreNotCollapsing(): bool|array
|
||||
public function checkAccompanyingPeriodsAreNotCollapsing(): array|bool
|
||||
{
|
||||
$periods = $this->getAccompanyingPeriodsOrdered();
|
||||
$periodsNbr = count($periods);
|
||||
|
@@ -156,7 +156,7 @@ class SocialAction
|
||||
*
|
||||
* @return Collection|SocialAction[] a list with the elements of the given list which are parent of other elements in the given list
|
||||
*/
|
||||
public static function findAncestorSocialActions(\Doctrine\Common\Collections\Collection|array $socialActions): Collection
|
||||
public static function findAncestorSocialActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
|
||||
{
|
||||
$ancestors = new ArrayCollection();
|
||||
|
||||
@@ -236,7 +236,7 @@ class SocialAction
|
||||
/**
|
||||
* @param Collection|SocialAction[] $socialActions
|
||||
*/
|
||||
public static function getDescendantsWithThisForActions(\Doctrine\Common\Collections\Collection|array $socialActions): Collection
|
||||
public static function getDescendantsWithThisForActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
|
||||
{
|
||||
$unique = [];
|
||||
|
||||
@@ -420,7 +420,7 @@ class SocialAction
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function filterRemoveDeactivatedActions(ReadableCollection|array $actions, \DateTime $comparisonDate): ReadableCollection|array
|
||||
public static function filterRemoveDeactivatedActions(array|ReadableCollection $actions, \DateTime $comparisonDate): array|ReadableCollection
|
||||
{
|
||||
$filterFn = fn (SocialAction $socialAction) => !$socialAction->isDesactivated($comparisonDate);
|
||||
|
||||
|
@@ -110,7 +110,7 @@ class SocialIssue
|
||||
*
|
||||
* @return Collection|SocialIssue[]
|
||||
*/
|
||||
public static function findAncestorSocialIssues(\Doctrine\Common\Collections\Collection|array $socialIssues): Collection
|
||||
public static function findAncestorSocialIssues(array|\Doctrine\Common\Collections\Collection $socialIssues): Collection
|
||||
{
|
||||
$ancestors = new ArrayCollection();
|
||||
|
||||
|
Reference in New Issue
Block a user