mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Rector: apply rules for doctrine code quality
This commit is contained in:
@@ -249,8 +249,6 @@ class AccompanyingPeriod implements
|
||||
private Collection $locationHistories;
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
*
|
||||
* @ORM\Column(type="date")
|
||||
* @Groups({"read", "write", "docgen:read"})
|
||||
* @Assert\LessThan(value="tomorrow", groups={AccompanyingPeriod::STEP_CONFIRMED})
|
||||
|
@@ -51,21 +51,21 @@ class PersonHouseholdAddress
|
||||
* @ORM\ManyToOne(targetEntity=Address::class)
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private $address;
|
||||
private ?\Chill\MainBundle\Entity\Address $address = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\ManyToOne(targetEntity=Household::class)
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private $household;
|
||||
private ?\Chill\PersonBundle\Entity\Household\Household $household = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\ManyToOne(targetEntity=Person::class)
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private $person;
|
||||
private ?\Chill\PersonBundle\Entity\Person $person = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date_immutable")
|
||||
|
@@ -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) {
|
||||
|
@@ -65,7 +65,7 @@ class ResidentialAddress
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Person::class)
|
||||
|
@@ -29,7 +29,7 @@ class PersonAltName
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@@ -37,7 +37,7 @@ class PersonAltName
|
||||
* @ORM\Column(name="key", type="string", length=255)
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
private $key;
|
||||
private ?string $key = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@@ -45,7 +45,7 @@ class PersonAltName
|
||||
* @ORM\Column(name="label", type="text")
|
||||
* @Groups({"write"})
|
||||
*/
|
||||
private $label;
|
||||
private ?string $label = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
|
@@ -37,7 +37,7 @@ class PersonNotDuplicate
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
|
||||
|
@@ -43,7 +43,7 @@ class SocialIssue
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
private $id;
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
|
||||
|
Reference in New Issue
Block a user