upgrade php-cs-fixer to 3.47.0

This commit is contained in:
2024-01-22 12:14:39 +01:00
parent fdfc3fb7ec
commit 27ce322690
58 changed files with 114 additions and 113 deletions

View File

@@ -91,14 +91,14 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface
return $this->startDate;
}
public function setAddressLocation(?Address $addressLocation): AccompanyingPeriodLocationHistory
public function setAddressLocation(?Address $addressLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory
{
$this->addressLocation = $addressLocation;
return $this;
}
public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriodLocationHistory
public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory
{
$this->endDate = $endDate;
@@ -108,21 +108,21 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface
/**
* @internal use AccompanyingPeriod::addLocationHistory
*/
public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriodLocationHistory
public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriod\AccompanyingPeriodLocationHistory
{
$this->period = $period;
return $this;
}
public function setPersonLocation(?Person $personLocation): AccompanyingPeriodLocationHistory
public function setPersonLocation(?Person $personLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory
{
$this->personLocation = $personLocation;
return $this;
}
public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriodLocationHistory
public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory
{
$this->startDate = $startDate;

View File

@@ -108,7 +108,7 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda
return $this;
}
public function setStep(string $step): AccompanyingPeriodStepHistory
public function setStep(string $step): AccompanyingPeriod\AccompanyingPeriodStepHistory
{
$this->step = $step;

View File

@@ -255,7 +255,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
$this->referrersHistory = new ArrayCollection();
}
public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self
public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self
{
if (!$this->accompanyingPeriodWorkEvaluations->contains($evaluation)) {
$this->accompanyingPeriodWorkEvaluations[] = $evaluation;
@@ -265,7 +265,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this;
}
public function addGoal(AccompanyingPeriodWorkGoal $goal): self
public function addGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self
{
if (!$this->goals->contains($goal)) {
$this->goals[] = $goal;
@@ -288,7 +288,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
{
if (!$this->getReferrers()->contains($referrer)) {
$this->referrersHistory[] =
new AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today'));
new AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today'));
}
return $this;
@@ -393,8 +393,8 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
public function getReferrers(): ReadableCollection
{
$users = $this->referrersHistory
->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate())
->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser())
->filter(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate())
->map(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser())
->getValues()
;
@@ -452,7 +452,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this->updatedBy;
}
public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self
public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self
{
$this->accompanyingPeriodWorkEvaluations
->removeElement($evaluation);
@@ -461,7 +461,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
return $this;
}
public function removeGoal(AccompanyingPeriodWorkGoal $goal): self
public function removeGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self
{
if ($this->goals->removeElement($goal)) {
// set the owning side to null (unless already changed)

View File

@@ -35,7 +35,7 @@ class AccompanyingPeriodWorkGoal
/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriodWork::class, inversedBy="goals")
*/
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork $accompanyingPeriodWork = null;
private ?AccompanyingPeriodWork $accompanyingPeriodWork = null;
/**
* @ORM\ManyToOne(targetEntity=Goal::class)

View File

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

View File

@@ -86,7 +86,7 @@ class UserHistory implements TrackCreationInterface
return $this->user;
}
public function setEndDate(?\DateTimeImmutable $endDate): UserHistory
public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\UserHistory
{
$this->endDate = $endDate;

View File

@@ -52,7 +52,7 @@ class PersonHouseholdAddress
*
* @ORM\JoinColumn(nullable=false)
*/
private ?\Chill\MainBundle\Entity\Address $address = null;
private ?Address $address = null;
/**
* @ORM\Id
@@ -61,7 +61,7 @@ class PersonHouseholdAddress
*
* @ORM\JoinColumn(nullable=false)
*/
private ?\Chill\PersonBundle\Entity\Household\Household $household = null;
private ?Household $household = null;
/**
* @ORM\Id
@@ -70,7 +70,7 @@ class PersonHouseholdAddress
*
* @ORM\JoinColumn(nullable=false)
*/
private ?\Chill\PersonBundle\Entity\Person $person = null;
private ?Person $person = null;
/**
* @ORM\Column(type="date_immutable")

View File

@@ -227,7 +227,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\JoinColumn(nullable=true)
*/
private ?\Chill\MainBundle\Entity\Civility $civility = null;
private ?Civility $civility = null;
/**
* Contact information for contacting the person.
@@ -245,7 +245,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\JoinColumn(nullable=true)
*/
private ?\Chill\MainBundle\Entity\Country $countryOfBirth = null;
private ?Country $countryOfBirth = null;
/**
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
@@ -257,7 +257,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\JoinColumn(nullable=true)
*/
private ?\Chill\MainBundle\Entity\User $createdBy = null;
private ?User $createdBy = null;
/**
* Cache the computation of household.
@@ -390,7 +390,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\JoinColumn(nullable=true)
*/
private ?\Chill\PersonBundle\Entity\MaritalStatus $maritalStatus = null;
private ?MaritalStatus $maritalStatus = null;
/**
* Comment on marital status.
@@ -433,7 +433,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @ORM\JoinColumn(nullable=true)
*/
private ?\Chill\MainBundle\Entity\Country $nationality = null;
private ?Country $nationality = null;
/**
* Number of children.
@@ -525,7 +525,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* targetEntity=User::class
* )
*/
private ?\Chill\MainBundle\Entity\User $updatedBy = null;
private ?User $updatedBy = null;
/**
* Person constructor.
@@ -1356,7 +1356,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* @return PersonResource[]|Collection
*/
public function getResources(): array|\Doctrine\Common\Collections\Collection
public function getResources(): array|Collection
{
return $this->resources;
}

View File

@@ -63,7 +63,7 @@ class PersonCenterCurrent
*
* @internal Should not be instantied, unless inside Person entity
*/
public function __construct(PersonCenterHistory $history)
public function __construct(Person\PersonCenterHistory $history)
{
$this->person = $history->getPerson();
$this->center = $history->getCenter();

View File

@@ -71,7 +71,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
*
* @Groups({"read", "docgen:read"})
*/
private ?PersonResourceKind $kind = null;
private ?Person\PersonResourceKind $kind = null;
/**
* The person which host the owner of this resource.
@@ -127,7 +127,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
return $this->id;
}
public function getKind(): ?PersonResourceKind
public function getKind(): ?Person\PersonResourceKind
{
return $this->kind;
}
@@ -196,7 +196,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
return $this;
}
public function setKind(?PersonResourceKind $kind): self
public function setKind(?Person\PersonResourceKind $kind): self
{
$this->kind = $kind;

View File

@@ -52,7 +52,7 @@ class PersonAltName
* inversedBy="altNames"
* )
*/
private ?\Chill\PersonBundle\Entity\Person $person = null;
private ?Person $person = null;
/**
* Get id.

View File

@@ -43,17 +43,17 @@ class PersonNotDuplicate
/**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private ?\Chill\PersonBundle\Entity\Person $person1 = null;
private ?Person $person1 = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private ?\Chill\PersonBundle\Entity\Person $person2 = null;
private ?Person $person2 = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private ?\Chill\MainBundle\Entity\User $user = null;
private ?User $user = null;
public function __construct()
{

View File

@@ -79,7 +79,7 @@ class SocialAction
/**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="socialActions")
*/
private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $issue = null;
private ?SocialIssue $issue = null;
/**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
@@ -89,7 +89,7 @@ class SocialAction
/**
* @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children")
*/
private ?\Chill\PersonBundle\Entity\SocialWork\SocialAction $parent = null;
private ?SocialAction $parent = null;
/**
* @var Collection<Result>
@@ -166,7 +166,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(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
public static function findAncestorSocialActions(array|Collection $socialActions): Collection
{
$ancestors = new ArrayCollection();
@@ -246,7 +246,7 @@ class SocialAction
/**
* @param Collection|SocialAction[] $socialActions
*/
public static function getDescendantsWithThisForActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
public static function getDescendantsWithThisForActions(array|Collection $socialActions): Collection
{
$unique = [];

View File

@@ -57,7 +57,7 @@ class SocialIssue
/**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children")
*/
private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $parent = null;
private ?SocialIssue $parent = null;
/**
* @var Collection<SocialAction>
@@ -115,7 +115,7 @@ class SocialIssue
*
* @return Collection|SocialIssue[]
*/
public static function findAncestorSocialIssues(array|\Doctrine\Common\Collections\Collection $socialIssues): Collection
public static function findAncestorSocialIssues(array|Collection $socialIssues): Collection
{
$ancestors = new ArrayCollection();