mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -28,12 +28,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||
*/
|
||||
class AccompanyingPeriodParticipation
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="participations", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="accompanyingperiod_id", referencedColumnName="id", nullable=false)
|
||||
*/
|
||||
private ?AccompanyingPeriod $accompanyingPeriod = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date", nullable=true)
|
||||
* @Groups({"read", "docgen:read"})
|
||||
@@ -48,24 +42,24 @@ class AccompanyingPeriodParticipation
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="accompanyingPeriodParticipations")
|
||||
* @ORM\JoinColumn(name="person_id", referencedColumnName="id", nullable=false)
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?Person $person = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="date", nullable=false)
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?DateTime $startDate = null;
|
||||
|
||||
public function __construct(AccompanyingPeriod $accompanyingPeriod, Person $person)
|
||||
{
|
||||
public function __construct(/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="participations", cascade={"persist"})
|
||||
* @ORM\JoinColumn(name="accompanyingperiod_id", referencedColumnName="id", nullable=false)
|
||||
*/
|
||||
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $accompanyingPeriod, /**
|
||||
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="accompanyingPeriodParticipations")
|
||||
* @ORM\JoinColumn(name="person_id", referencedColumnName="id", nullable=false)
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?\Chill\PersonBundle\Entity\Person $person
|
||||
) {
|
||||
$this->startDate = new DateTime('now');
|
||||
$this->accompanyingPeriod = $accompanyingPeriod;
|
||||
$this->person = $person;
|
||||
$person->getAccompanyingPeriodParticipations()->add($this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user