Rector: apply rules for doctrine code quality

This commit is contained in:
2023-08-31 10:35:52 +02:00
parent bc9b7b1776
commit e4e52234ad
32 changed files with 74 additions and 92 deletions

View File

@@ -158,12 +158,10 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The person's birthdate.
*
* @var DateTime
*
* @ORM\Column(type="date", nullable=true)
* @Birthdate
*/
private $birthdate;
private ?\DateTime $birthdate = null;
/**
* @var Collection<Charge>
@@ -184,7 +182,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
private Collection $budgetResources;
/**
* @var Collection<Calendar>
* @var Collection<int, Calendar>
* @ORM\ManyToMany(
* targetEntity="Chill\CalendarBundle\Entity\Calendar",
* mappedBy="persons"
@@ -397,8 +395,6 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The date of the last marital status change of the person.
*
* @var DateTime
*
* @ORM\Column(type="date", nullable=true)
* @Assert\Date
*/
@@ -527,6 +523,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*/
public function __construct()
{
$this->calendars = new \Doctrine\Common\Collections\ArrayCollection();
$this->accompanyingPeriodParticipations = new ArrayCollection();
$this->spokenLanguages = new ArrayCollection();
$this->addresses = new ArrayCollection();
@@ -929,6 +926,14 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this->budgetResources;
}
/**
* @return Collection<int, Calendar>
*/
public function getCalendars(): Collection
{
return $this->calendars;
}
public function getCenter(): ?Center
{
if (null !== $this->centerCurrent) {