Olivier Massot 6 mesi fa
parent
commit
a13d924bff

+ 13 - 9
src/Entity/Access/Access.php

@@ -217,6 +217,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
     /**
      * TODO: orphanRemoval?
+     *
      * @var Collection<int, Course>
      */
     #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'students', cascade: ['persist'])]
@@ -224,6 +225,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
     /**
      * TODO: orphanRemoval?
+     *
      * @var Collection<int, Course>
      */
     #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'organizer', cascade: ['persist'])]
@@ -235,6 +237,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
     /**
      * TODO: orphanRemoval?
+     *
      * @var Collection<int, EducationalProject>
      */
     #[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'organizer', cascade: ['persist'])]
@@ -2539,12 +2542,13 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
         return $this;
     }
-    function getSimulationSessionAccessInitiators(): Collection
+
+    public function getSimulationSessionAccessInitiators(): Collection
     {
         return $this->simulationSessionAccessInitiators;
     }
 
-    function addSimulationSessionAccessInitiator(SimulationSession $simulationSessionAccessInitiator): self
+    public function addSimulationSessionAccessInitiator(SimulationSession $simulationSessionAccessInitiator): self
     {
         if (!$this->simulationSessionAccessInitiators->contains($simulationSessionAccessInitiator)) {
             $this->simulationSessionAccessInitiators[] = $simulationSessionAccessInitiator;
@@ -2554,19 +2558,19 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    function removeSimulationSessionAccessInitiator(SimulationSession $simulationSessionAccessInitiator): self
+    public function removeSimulationSessionAccessInitiator(SimulationSession $simulationSessionAccessInitiator): self
     {
         $this->simulationSessionAccessInitiators->removeElement($simulationSessionAccessInitiator);
 
         return $this;
     }
 
-    function getSimulationSessionAccessSimulateds(): Collection
+    public function getSimulationSessionAccessSimulateds(): Collection
     {
         return $this->simulationSessionAccessSimulateds;
     }
 
-    function addSimulationSessionAccessSimulated(SimulationSession $simulationSessionAccessSimulated): self
+    public function addSimulationSessionAccessSimulated(SimulationSession $simulationSessionAccessSimulated): self
     {
         if (!$this->simulationSessionAccessSimulateds->contains($simulationSessionAccessSimulated)) {
             $this->simulationSessionAccessSimulateds[] = $simulationSessionAccessSimulated;
@@ -2576,19 +2580,19 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    function removeSimulationSessionAccessSimulated(SimulationSession $simulationSessionAccessSimulated): self
+    public function removeSimulationSessionAccessSimulated(SimulationSession $simulationSessionAccessSimulated): self
     {
         $this->simulationSessionAccessSimulateds->removeElement($simulationSessionAccessSimulated);
 
         return $this;
     }
 
-    function getOrders(): Collection
+    public function getOrders(): Collection
     {
         return $this->orders;
     }
 
-    function addOrder(Orders $order): self
+    public function addOrder(Orders $order): self
     {
         if (!$this->orders->contains($order)) {
             $this->orders[] = $order;
@@ -2598,7 +2602,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    function removeOrder(Orders $order): self
+    public function removeOrder(Orders $order): self
     {
         if ($this->orders->removeElement($order)) {
             $order->setAccess(null);

+ 3 - 2
src/Entity/Billing/BillingSettingRent.php

@@ -45,14 +45,15 @@ class BillingSettingRent
         return $this->id;
     }
 
-    function getFamilyQuotientModel(): ?FamilyQuotientModel
+    public function getFamilyQuotientModel(): ?FamilyQuotientModel
     {
         return $this->familyQuotientModel;
     }
 
-    function setFamilyQuotientModel(?FamilyQuotientModel $familyQuotientModel): self
+    public function setFamilyQuotientModel(?FamilyQuotientModel $familyQuotientModel): self
     {
         $this->familyQuotientModel = $familyQuotientModel;
+
         return $this;
     }
 }

+ 3 - 3
src/Entity/Billing/FamilyQuotientModel.php

@@ -116,12 +116,12 @@ class FamilyQuotientModel
         return $this;
     }
 
-    function getBillingSettingRents(): Collection
+    public function getBillingSettingRents(): Collection
     {
         return $this->billingSettingRents;
     }
 
-    function addBillingSettingRent(BillingSettingRent $billingSettingRent): self
+    public function addBillingSettingRent(BillingSettingRent $billingSettingRent): self
     {
         if (!$this->billingSettingRents->contains($billingSettingRent)) {
             $this->billingSettingRents[] = $billingSettingRent;
@@ -131,7 +131,7 @@ class FamilyQuotientModel
         return $this;
     }
 
-    function removeBillingSettingRent(BillingSettingRent $billingSettingRent): self
+    public function removeBillingSettingRent(BillingSettingRent $billingSettingRent): self
     {
         if ($this->billingSettingRents->removeElement($billingSettingRent)) {
             $billingSettingRent->setFamilyQuotientModel(null);

+ 1 - 0
src/Entity/Booking/AttendanceBookingReason.php

@@ -66,6 +66,7 @@ class AttendanceBookingReason
 
     /**
      * Pas de cascade remove ici, les absences / présences existent indépendamment de ce motif.
+     *
      * @var Collection<int, AttendanceBooking>
      */
     #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'reason', cascade: ['persist'])]

+ 1 - 1
src/Entity/Core/File.php

@@ -10,11 +10,11 @@ use ApiPlatform\Metadata\Get;
 use ApiPlatform\Metadata\Post;
 use ApiPlatform\Metadata\Put;
 use App\Entity\AccessWish\DocumentWish;
+use App\Entity\Billing\SddRegie;
 use App\Entity\Booking\CalendarSynchro;
 use App\Entity\Booking\Event;
 use App\Entity\Booking\EventReport;
 use App\Entity\Booking\Work;
-use App\Entity\Billing\SddRegie;
 use App\Entity\Message\TemplateSystem;
 use App\Entity\Network\Network;
 use App\Entity\Organization\Activity;

+ 1 - 1
src/Entity/Core/Tagg.php

@@ -56,7 +56,7 @@ class Tagg
     private ?int $id = null;
 
     #[ORM\Column(length: 50)]
-    #[Assert\Length(min: 3, minMessage: "Label shall contain at least {{ limit }} characters.")]
+    #[Assert\Length(min: 3, minMessage: 'Label shall contain at least {{ limit }} characters.')]
     protected string $label;
 
     #[ORM\ManyToOne]

+ 3 - 4
src/Entity/Core/Tips.php

@@ -7,7 +7,6 @@ namespace App\Entity\Core;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Organization\Organization;
-use App\Entity\Product\IntangiblePriceAndDiscount;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -31,12 +30,12 @@ class Tips extends AbstractInformation
         parent::__construct();
     }
 
-    function getOrganizations(): Collection
+    public function getOrganizations(): Collection
     {
         return $this->organizations;
     }
 
-    function addOrganization(Organization $organization): self
+    public function addOrganization(Organization $organization): self
     {
         if (!$this->organizations->contains($organization)) {
             $this->organizations[] = $organization;
@@ -46,7 +45,7 @@ class Tips extends AbstractInformation
         return $this;
     }
 
-    function removeOrganization(Organization $organization): self
+    public function removeOrganization(Organization $organization): self
     {
         if ($this->organizations->removeElement($organization)) {
             $organization->removeTip($this);

+ 3 - 4
src/Entity/Education/EducationCurriculumPack.php

@@ -8,7 +8,6 @@ use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
 use App\Entity\Product\Intangible;
-use App\Entity\Product\IntangiblePriceAndDiscount;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -194,12 +193,12 @@ class EducationCurriculumPack
         return $this;
     }
 
-    function getRequiredChoicesBlocks(): Collection
+    public function getRequiredChoicesBlocks(): Collection
     {
         return $this->requiredChoicesBlocks;
     }
 
-    function addRequiredChoicesBlock(RequiredChoicesBlock $requiredChoicesBlock): self
+    public function addRequiredChoicesBlock(RequiredChoicesBlock $requiredChoicesBlock): self
     {
         if (!$this->requiredChoicesBlocks->contains($requiredChoicesBlock)) {
             $this->requiredChoicesBlocks[] = $requiredChoicesBlock;
@@ -209,7 +208,7 @@ class EducationCurriculumPack
         return $this;
     }
 
-    function removeRequiredChoicesBlock(RequiredChoicesBlock $requiredChoicesBlock): self
+    public function removeRequiredChoicesBlock(RequiredChoicesBlock $requiredChoicesBlock): self
     {
         $this->requiredChoicesBlocks->removeElement($requiredChoicesBlock);
 

+ 10 - 10
src/Entity/Education/RequiredChoicesBlock.php

@@ -9,8 +9,6 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
-use App\Entity\Education;
-use App\Entity\Product\IntangiblePriceAndDiscount;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -26,7 +24,7 @@ class RequiredChoicesBlock
 
     #[ORM\ManyToOne(targetEntity: EducationCurriculumPack::class, inversedBy: 'requiredChoicesBlocks')]
     #[ORM\JoinColumn(nullable: false)]
-    protected Education\EducationCurriculumPack $educationCurriculumPack;
+    protected EducationCurriculumPack $educationCurriculumPack;
 
     /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(
@@ -45,34 +43,36 @@ class RequiredChoicesBlock
         $this->requiredChoicesEducationCurriculums = new ArrayCollection();
     }
 
-    function getId(): int
+    public function getId(): int
     {
         return $this->id;
     }
 
-    function setId(int $id): self
+    public function setId(int $id): self
     {
         $this->id = $id;
+
         return $this;
     }
 
-    function getEducationCurriculumPack(): EducationCurriculumPack
+    public function getEducationCurriculumPack(): EducationCurriculumPack
     {
         return $this->educationCurriculumPack;
     }
 
-    function setEducationCurriculumPack(EducationCurriculumPack $educationCurriculumPack): self
+    public function setEducationCurriculumPack(EducationCurriculumPack $educationCurriculumPack): self
     {
         $this->educationCurriculumPack = $educationCurriculumPack;
+
         return $this;
     }
 
-    function getRequiredChoicesEducationCurriculum(): Collection
+    public function getRequiredChoicesEducationCurriculum(): Collection
     {
         return $this->requiredChoicesEducationCurriculums;
     }
 
-    function addRequiredChoicesEducationCurriculum(EducationCurriculum $educationCurriculum): self
+    public function addRequiredChoicesEducationCurriculum(EducationCurriculum $educationCurriculum): self
     {
         if (!$this->requiredChoicesEducationCurriculums->contains($educationCurriculum)) {
             $this->requiredChoicesEducationCurriculums[] = $educationCurriculum;
@@ -82,7 +82,7 @@ class RequiredChoicesBlock
         return $this;
     }
 
-    function removeRequiredChoicesEducationCurriculum(EducationCurriculum $educationCurriculum): self
+    public function removeRequiredChoicesEducationCurriculum(EducationCurriculum $educationCurriculum): self
     {
         if ($this->requiredChoicesEducationCurriculums->removeElement($educationCurriculum)) {
             $educationCurriculum->removeRequiredChoicesEducationCurriculumPack($this);

+ 12 - 9
src/Entity/Organization/Organization.php

@@ -238,14 +238,16 @@ class Organization
     private ?string $otherPractice = null;
 
     /**
-     * orphanRemoval: on ne conserve pas un contact point qui n'est plus lié à aucune organisation ou person
+     * orphanRemoval: on ne conserve pas un contact point qui n'est plus lié à aucune organisation ou person.
+     *
      * @var Collection<int, ContactPoint>
      */
     #[ORM\ManyToMany(targetEntity: ContactPoint::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
     private Collection $contactPoints;
 
     /**
-     * orphanRemoval: on ne conserve pas un contact point qui n'est plus lié à aucune organisation ou person
+     * orphanRemoval: on ne conserve pas un contact point qui n'est plus lié à aucune organisation ou person.
+     *
      * @var Collection<int, BankAccount>
      */
     #[ORM\ManyToMany(targetEntity: BankAccount::class, inversedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
@@ -430,7 +432,8 @@ class Organization
     protected Collection $orders;
 
     /**
-     * orphanRemoval: on ne conserve pas un tips qui n'est plus lié à aucune organisation ou access
+     * orphanRemoval: on ne conserve pas un tips qui n'est plus lié à aucune organisation ou access.
+     *
      * @var Collection<int, Tips>
      */
     #[ORM\ManyToMany(targetEntity: Tips::class, inversedBy: 'organizations', cascade: ['persist'], orphanRemoval: false)]
@@ -2225,12 +2228,12 @@ class Organization
         return $this;
     }
 
-    function getOrders(): Collection
+    public function getOrders(): Collection
     {
         return $this->orders;
     }
 
-    function addOrder(Orders $order): self
+    public function addOrder(Orders $order): self
     {
         if (!$this->orders->contains($order)) {
             $this->orders[] = $order;
@@ -2240,7 +2243,7 @@ class Organization
         return $this;
     }
 
-    function removeOrder(Orders $order): self
+    public function removeOrder(Orders $order): self
     {
         if ($this->orders->removeElement($order)) {
             $order->setOrganization(null);
@@ -2249,12 +2252,12 @@ class Organization
         return $this;
     }
 
-    function getTips(): Collection
+    public function getTips(): Collection
     {
         return $this->tips;
     }
 
-    function addTip(Tips $tip): self
+    public function addTip(Tips $tip): self
     {
         if (!$this->tips->contains($tip)) {
             $this->tips[] = $tip;
@@ -2264,7 +2267,7 @@ class Organization
         return $this;
     }
 
-    function removeTip(Tips $tip): self
+    public function removeTip(Tips $tip): self
     {
         if ($this->tips->removeElement($tip)) {
             $tip->removeOrganization($this);

+ 1 - 0
src/Entity/Public/FederationStructure.php

@@ -221,6 +221,7 @@ class FederationStructure
     public function setIsFederation(bool $isFederation): self
     {
         $this->isFederation = $isFederation;
+
         return $this;
     }
 

+ 9 - 6
src/Entity/Shop/Orders.php

@@ -24,36 +24,39 @@ class Orders
     #[ORM\ManyToOne(targetEntity: Access::class, cascade: [], inversedBy: 'orders')]
     protected ?Access $access;
 
-    function getUuid(): mixed
+    public function getUuid(): mixed
     {
         return $this->uuid;
     }
 
-    function setUuid(mixed $uuid): self
+    public function setUuid(mixed $uuid): self
     {
         $this->uuid = $uuid;
+
         return $this;
     }
 
-     function getOrganization(): ?Organization
+    public function getOrganization(): ?Organization
     {
         return $this->organization;
     }
 
-    function setOrganization(?Organization $organization): self
+    public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
+
         return $this;
     }
 
-    function getAccess(): ?Access
+    public function getAccess(): ?Access
     {
         return $this->access;
     }
 
-    function setAccess(?Access $access): self
+    public function setAccess(?Access $access): self
     {
         $this->access = $access;
+
         return $this;
     }
 }

+ 39 - 27
src/Entity/SimulationSession/SimulationSession.php

@@ -1,6 +1,5 @@
 <?php
 
-
 declare(strict_types=1);
 
 namespace App\Entity\SimulationSession;
@@ -62,146 +61,159 @@ class SimulationSession
     #[ORM\OneToOne(mappedBy: 'simulationSession', targetEntity: Token::class, cascade: ['persist'])]
     protected ?Token $token;
 
-    function getId(): int
+    public function getId(): int
     {
         return $this->id;
     }
 
-    function setId(int $id): self
+    public function setId(int $id): self
     {
         $this->id = $id;
+
         return $this;
     }
 
-    function getInitiatorIp(): mixed
+    public function getInitiatorIp(): mixed
     {
         return $this->initiatorIp;
     }
 
-    function setInitiatorIp(mixed $initiatorIp): self
+    public function setInitiatorIp(mixed $initiatorIp): self
     {
         $this->initiatorIp = $initiatorIp;
+
         return $this;
     }
 
-    function getExpiryDate(): ?\DateTimeInterface
+    public function getExpiryDate(): ?\DateTimeInterface
     {
         return $this->expiryDate;
     }
 
-    function setExpiryDate(?\DateTimeInterface $expiryDate): self
+    public function setExpiryDate(?\DateTimeInterface $expiryDate): self
     {
         $this->expiryDate = $expiryDate;
+
         return $this;
     }
 
-    function getAlreadyUsed(): bool
+    public function getAlreadyUsed(): bool
     {
         return $this->alreadyUsed;
     }
 
-    function setAlreadyUsed(bool $alreadyUsed): self
+    public function setAlreadyUsed(bool $alreadyUsed): self
     {
         $this->alreadyUsed = $alreadyUsed;
+
         return $this;
     }
 
-    function getCreateDate(): ?\DateTimeInterface
+    public function getCreateDate(): ?\DateTimeInterface
     {
         return $this->createDate;
     }
 
-    function setCreateDate(?\DateTimeInterface $createDate): self
+    public function setCreateDate(?\DateTimeInterface $createDate): self
     {
         $this->createDate = $createDate;
+
         return $this;
     }
 
-    function getUpdateDate(): ?\DateTimeInterface
+    public function getUpdateDate(): ?\DateTimeInterface
     {
         return $this->updateDate;
     }
 
-    function setUpdateDate(?\DateTimeInterface $updateDate): self
+    public function setUpdateDate(?\DateTimeInterface $updateDate): self
     {
         $this->updateDate = $updateDate;
+
         return $this;
     }
 
-    function getLegacyId(): int
+    public function getLegacyId(): int
     {
         return $this->legacyId;
     }
 
-    function setLegacyId(int $legacyId): self
+    public function setLegacyId(int $legacyId): self
     {
         $this->legacyId = $legacyId;
+
         return $this;
     }
 
-    function getCreatedBy(): int
+    public function getCreatedBy(): int
     {
         return $this->createdBy;
     }
 
-    function setCreatedBy(int $createdBy): self
+    public function setCreatedBy(int $createdBy): self
     {
         $this->createdBy = $createdBy;
+
         return $this;
     }
 
-    function getUpdatedBy(): int
+    public function getUpdatedBy(): int
     {
         return $this->updatedBy;
     }
 
-    function setUpdatedBy(int $updatedBy): self
+    public function setUpdatedBy(int $updatedBy): self
     {
         $this->updatedBy = $updatedBy;
+
         return $this;
     }
 
-    function getDraft(): bool
+    public function getDraft(): bool
     {
         return $this->draft;
     }
 
-    function setDraft(bool $draft): self
+    public function setDraft(bool $draft): self
     {
         $this->draft = $draft;
+
         return $this;
     }
 
-    function getAccessInitiator(): Access
+    public function getAccessInitiator(): Access
     {
         return $this->accessInitiator;
     }
 
-    function setAccessInitiator(Access $accessInitiator): self
+    public function setAccessInitiator(Access $accessInitiator): self
     {
         $this->accessInitiator = $accessInitiator;
+
         return $this;
     }
 
-    function getAccessSimulated(): Access
+    public function getAccessSimulated(): Access
     {
         return $this->accessSimulated;
     }
 
-    function setAccessSimulated(Access $accessSimulated): self
+    public function setAccessSimulated(Access $accessSimulated): self
     {
         $this->accessSimulated = $accessSimulated;
+
         return $this;
     }
 
-    function getToken(): ?Token
+    public function getToken(): ?Token
     {
         return $this->token;
     }
 
-    function setToken(?Token $token): self
+    public function setToken(?Token $token): self
     {
         $this->token = $token;
+
         return $this;
     }
 }

+ 3 - 2
src/Entity/Token/Token.php

@@ -53,14 +53,15 @@ class Token
         return $this;
     }
 
-    function getSimulationSession(): ?SimulationSession
+    public function getSimulationSession(): ?SimulationSession
     {
         return $this->simulationSession;
     }
 
-    function setSimulationSession(?SimulationSession $simulationSession): self
+    public function setSimulationSession(?SimulationSession $simulationSession): self
     {
         $this->simulationSession = $simulationSession;
+
         return $this;
     }
 }