mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
Rector: apply rules for doctrine code quality
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user