瀏覽代碼

fix most of phpstan errors

Olivier Massot 8 月之前
父節點
當前提交
11516c4c88
共有 73 個文件被更改,包括 466 次插入432 次删除
  1. 53 29
      src/Entity/Access/Access.php
  2. 3 1
      src/Entity/Access/AccessCommunication.php
  3. 1 1
      src/Entity/Access/AccessNetworkSetting.php
  4. 1 1
      src/Entity/Access/AccessSocial.php
  5. 2 0
      src/Entity/AccessWish/AccessFamilyWish.php
  6. 7 7
      src/Entity/AccessWish/AccessWish.php
  7. 2 2
      src/Entity/AccessWish/DocumentWish.php
  8. 4 2
      src/Entity/AccessWish/EducationStudentWish.php
  9. 6 6
      src/Entity/Awin/Product.php
  10. 26 25
      src/Entity/Billing/AbstractBillAccounting.php
  11. 1 1
      src/Entity/Billing/AccessBilling.php
  12. 4 2
      src/Entity/Billing/Afi.php
  13. 1 1
      src/Entity/Billing/BergerLevrault.php
  14. 3 3
      src/Entity/Billing/BillLine.php
  15. 7 7
      src/Entity/Billing/BillPayment.php
  16. 7 3
      src/Entity/Billing/BillSchedule.php
  17. 6 4
      src/Entity/Billing/BillingExportSetting.php
  18. 4 4
      src/Entity/Billing/BillingSetting.php
  19. 4 4
      src/Entity/Billing/BillingSettingRent.php
  20. 3 3
      src/Entity/Billing/Ciril.php
  21. 6 4
      src/Entity/Billing/CirilCivil.php
  22. 6 7
      src/Entity/Billing/FamilyQuotientBand.php
  23. 5 4
      src/Entity/Billing/FamilyQuotientBandDetail.php
  24. 4 2
      src/Entity/Billing/FamilyQuotientModel.php
  25. 3 3
      src/Entity/Billing/Jvs.php
  26. 5 4
      src/Entity/Billing/Odyssee.php
  27. 3 3
      src/Entity/Billing/Pes.php
  28. 3 3
      src/Entity/Billing/PesSetting.php
  29. 5 4
      src/Entity/Billing/SddBank.php
  30. 8 7
      src/Entity/Billing/SddRegie.php
  31. 7 7
      src/Entity/Booking/CalendarSynchro.php
  32. 5 3
      src/Entity/Booking/Course.php
  33. 5 4
      src/Entity/Booking/EducationalProject.php
  34. 10 8
      src/Entity/Booking/Event.php
  35. 16 14
      src/Entity/Booking/Examen.php
  36. 4 0
      src/Entity/Booking/OrganizationHoliday.php
  37. 7 3
      src/Entity/Booking/PersonHoliday.php
  38. 2 0
      src/Entity/Core/AddressPostal.php
  39. 6 4
      src/Entity/Core/File.php
  40. 1 1
      src/Entity/Core/LoginLog.php
  41. 9 5
      src/Entity/Core/Tagg.php
  42. 2 0
      src/Entity/Education/Cycle.php
  43. 2 0
      src/Entity/Education/Education.php
  44. 2 0
      src/Entity/Education/EducationComplement.php
  45. 8 0
      src/Entity/Education/EducationCurriculum.php
  46. 6 0
      src/Entity/Education/EducationCurriculumPack.php
  47. 3 3
      src/Entity/Education/EducationStudent.php
  48. 5 2
      src/Entity/Message/AbstractMessage.php
  49. 2 3
      src/Entity/Message/AbstractReport.php
  50. 0 118
      src/Entity/Message/Message.php
  51. 7 7
      src/Entity/Message/ReportMessage.php
  52. 3 3
      src/Entity/Network/Network.php
  53. 3 3
      src/Entity/Organization/Activity.php
  54. 4 4
      src/Entity/Organization/CotisationByYear.php
  55. 3 3
      src/Entity/Organization/CotisationStaffInfos.php
  56. 3 3
      src/Entity/Organization/OnlineRegistrationDocument.php
  57. 7 5
      src/Entity/Organization/OnlineRegistrationSettings.php
  58. 57 18
      src/Entity/Organization/Organization.php
  59. 6 6
      src/Entity/Person/AllowedIp.php
  60. 4 4
      src/Entity/Person/Medical.php
  61. 5 3
      src/Entity/Person/Person.php
  62. 23 11
      src/Entity/Place/AbstractPlace.php
  63. 3 3
      src/Entity/Place/PlaceControl.php
  64. 2 6
      src/Entity/Place/PlaceRepair.php
  65. 2 0
      src/Entity/Place/RoomControl.php
  66. 2 0
      src/Entity/Place/RoomRepair.php
  67. 2 0
      src/Entity/Product/AbstractProduct.php
  68. 6 2
      src/Entity/Product/Equipment.php
  69. 0 1
      src/Entity/Product/EquipmentControl.php
  70. 14 13
      src/Entity/Product/Intangible.php
  71. 6 6
      src/Entity/Product/IntangibleDiscountDetail.php
  72. 6 6
      src/Entity/Product/IntangiblePriceAndDiscount.php
  73. 3 3
      src/Entity/Token/Token.php

+ 53 - 29
src/Entity/Access/Access.php

@@ -38,9 +38,9 @@ use App\Entity\Education\EducationNotationConfig;
 use App\Entity\Education\EducationStudent;
 use App\Entity\Education\EducationTeacher;
 use App\Entity\Message\AbstractMessage;
+use App\Entity\Message\AbstractReport;
 use App\Entity\Message\Email;
 use App\Entity\Message\Mail;
-use App\Entity\Message\Message;
 use App\Entity\Message\Sms;
 use App\Entity\Organization\Jury;
 use App\Entity\Organization\Organization;
@@ -76,7 +76,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
  * Security :
  *
  *     @see ~/config/api_platform/Access/access.yaml
- *     @see App\Doctrine\Access\CurrentAccessExtension
+ *     @see \App\Doctrine\Access\CurrentAccessExtension
  */
 #[ApiResource]
 // #[Auditable]
@@ -370,39 +370,49 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 //    #[ORM\ManyToMany(mappedBy: 'organizer', targetEntity: AbstractBooking::class, cascade: ['persist'], orphanRemoval: false)]
 //    private Collection $bookingOrganizers;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: AdvancePayment::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, AdvancePayment> */
+    #[ORM\OneToMany(targetEntity: AdvancePayment::class, mappedBy: 'access', cascade: [], orphanRemoval: true)]
     private Collection $advancePayments;
 
-    #[ORM\OneToMany(mappedBy: 'author', targetEntity: Message::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, AbstractMessage> */
+    #[ORM\OneToMany(targetEntity: AbstractMessage::class, mappedBy: 'author', cascade: [], orphanRemoval: true)]
     private Collection $messages;
 
-    #[ORM\OneToMany(mappedBy: 'managerControl', targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'managerControl', cascade: [], orphanRemoval: false)]
     private Collection $equipmentManagerControls;
 
-    #[ORM\OneToMany(mappedBy: 'accompanist', targetEntity: AbstractControl::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, AbstractControl> */
+    #[ORM\OneToMany(targetEntity: AbstractControl::class, mappedBy: 'accompanist', cascade: [], orphanRemoval: true)]
     private Collection $accompanistControl;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessReward::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AccessReward> */
+    #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
     private Collection $rewards;
 
-    #[ORM\OneToOne(mappedBy: 'access', targetEntity: AccessSocial::class, cascade: ['persist'], orphanRemoval: true)]
-    private AccessSocial $accessSocial;
+    #[ORM\OneToOne(targetEntity: AccessSocial::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
+    private ?AccessSocial $accessSocial;
 
-    #[ORM\OneToOne(mappedBy: 'access', targetEntity: AccessNetworkSetting::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
-    private AccessNetworkSetting $accessNetworkSetting;
+    #[ORM\OneToOne(targetEntity: AccessNetworkSetting::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
+    private ?AccessNetworkSetting $accessNetworkSetting;
 
-    #[ORM\OneToOne(mappedBy: 'access', targetEntity: AccessCommunication::class, cascade: ['persist'], orphanRemoval: true)]
-    private AccessCommunication $accessCommunication;
+    #[ORM\OneToOne(targetEntity: AccessCommunication::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
+    private ?AccessCommunication $accessCommunication;
 
-    #[ORM\OneToOne(mappedBy: 'access', targetEntity: CalendarSynchro::class, cascade: ['persist'], orphanRemoval: true)]
-    private CalendarSynchro $calendarSynchro;
+    #[ORM\OneToOne(targetEntity: CalendarSynchro::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
+    private ?CalendarSynchro $calendarSynchro;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: Token::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Token> */
+    #[ORM\OneToMany(targetEntity: Token::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
     private Collection $tokens;
 
     #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], fetch: 'EAGER', orphanRemoval: true)]
     private ?Preferences $preferences;
 
+    /** @var Collection<int, AbstractReport> */
+    #[ORM\OneToMany(targetEntity: AbstractReport::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
+    private Collection $reports;
+
     #[Pure]
     public function __construct()
     {
@@ -1170,9 +1180,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    /**
-     * @return Collection<int, Course>
-     */
     public function getPracticalCourses(): Collection
     {
         return $this->practicalCourses;
@@ -1188,7 +1195,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    public function removePracticalCourse(Course $practicalCourse): self
+    public function removePracticalCourse(AbstractBooking $practicalCourse): self
     {
         if ($this->practicalCourses->removeElement($practicalCourse)) {
             $practicalCourse->removeOrganizer($this);
@@ -1334,12 +1341,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
     public function removeBillCredit(BillCredit $billCredit): self
     {
-        if ($this->billCredits->removeElement($billCredit)) {
-            // set the owning side to null (unless already changed)
-            if ($billCredit->getAccess() === $this) {
-                $billCredit->setAccess(null);
-            }
-        }
+        $this->billCredits->removeElement($billCredit);
 
         return $this;
     }
@@ -2290,9 +2292,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
     public function removeAdvancePayment(AdvancePayment $advancePayment): self
     {
-        if ($this->advancePayments->removeElement($advancePayment)) {
-            $advancePayment->setAccess(null);
-        }
+        $this->advancePayments->removeElement($advancePayment);
 
         return $this;
     }
@@ -2479,4 +2479,28 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     {
         return $this->preferences;
     }
+
+    public function getReports(): Collection
+    {
+        return $this->reports;
+    }
+
+    public function addReport(AbstractReport $report): self
+    {
+        if (!$this->reports->contains($report)) {
+            $this->reports[] = $report;
+            $report->setAccess($this);
+        }
+
+        return $this;
+    }
+
+    public function removeReport(AbstractReport $report): self
+    {
+        if ($this->reports->removeElement($report)) {
+            $report->setAccess(null);
+        }
+
+        return $this;
+    }
 }

+ 3 - 1
src/Entity/Access/AccessCommunication.php

@@ -6,6 +6,8 @@ namespace App\Entity\Access;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Message\AbstractMessage;
+use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
@@ -22,7 +24,7 @@ class AccessCommunication
     private ?int $id = null;
 
     #[ORM\OneToOne(inversedBy: 'accessCommunication', targetEntity: Access::class, cascade: ['persist'])]
-    protected Access $access;
+    protected ?Access $access;
 
     public function getId(): ?int
     {

+ 1 - 1
src/Entity/Access/AccessNetworkSetting.php

@@ -22,7 +22,7 @@ class AccessNetworkSetting
     private ?int $id = null;
 
     #[ORM\OneToOne(inversedBy: 'accessNetworkSetting', targetEntity: Access::class, cascade: ['persist'])]
-    protected Access $access;
+    protected ?Access $access;
 
     public function getId(): ?int
     {

+ 1 - 1
src/Entity/Access/AccessSocial.php

@@ -22,7 +22,7 @@ class AccessSocial
     private ?int $id = null;
 
     #[ORM\OneToOne(inversedBy: 'accessSocial', targetEntity: Access::class, cascade: ['persist'])]
-    protected Access $access;
+    protected ?Access $access;
 
     public function getId(): ?int
     {

+ 2 - 0
src/Entity/AccessWish/AccessFamilyWish.php

@@ -6,6 +6,7 @@ namespace App\Entity\AccessWish;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Message\AbstractMessage;
 use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -40,6 +41,7 @@ class AccessFamilyWish
     #[ORM\Column]
     private bool $closeRegistration = false;
 
+    /** @var Collection<int, AccessWish> */
     #[ORM\OneToMany(mappedBy: 'accessFamilyWish', targetEntity: AccessWish::class, cascade: ['remove'], orphanRemoval: false)]
     protected Collection $accessWishesGuardians;
 

+ 7 - 7
src/Entity/AccessWish/AccessWish.php

@@ -75,21 +75,21 @@ class AccessWish
 
     #[ORM\ManyToOne(targetEntity: BillSchedule::class, cascade: ['persist'], inversedBy: 'accessWishes')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected BillSchedule $billSchedule;
+    protected ?BillSchedule $billSchedule;
 
-    #[ORM\OneToOne(mappedBy: 'accessWishRib', targetEntity: DocumentWish::class, cascade: ['persist'])]
-    protected DocumentWish $documentRib;
+    #[ORM\OneToOne(targetEntity: DocumentWish::class, mappedBy: 'accessWishRib', cascade: ['persist'])]
+    protected ?DocumentWish $documentRib;
 
-    #[ORM\OneToOne(mappedBy: 'accessWishSepa', targetEntity: DocumentWish::class, cascade: ['persist'])]
-    protected DocumentWish $documentSepa;
+    #[ORM\OneToOne(targetEntity: DocumentWish::class, mappedBy: 'accessWishSepa', cascade: ['persist'])]
+    protected ?DocumentWish $documentSepa;
 
     #[ORM\ManyToOne(targetEntity: EducationCurriculumPack::class, cascade: [])]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected EducationCurriculumPack $wishPack;
+    protected ?EducationCurriculumPack $wishPack;
 
     #[ORM\ManyToOne(targetEntity: Place::class, cascade: [])]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Place $favoritePlace;
+    protected ?Place $favoritePlace;
 
     /**
      * Date de création dde l'entité.

+ 2 - 2
src/Entity/AccessWish/DocumentWish.php

@@ -39,10 +39,10 @@ class DocumentWish
     private Collection $files;
 
     #[ORM\OneToOne(inversedBy: 'documentRib', targetEntity: AccessWish::class, cascade: [])]
-    protected AccessWish $accessWishRib;
+    protected ?AccessWish $accessWishRib;
 
     #[ORM\OneToOne(inversedBy: 'documentSepa', targetEntity: AccessWish::class, cascade: [])]
-    protected AccessWish $accessWishSepa;
+    protected ?AccessWish $accessWishSepa;
 
     public function __construct()
     {

+ 4 - 2
src/Entity/AccessWish/EducationStudentWish.php

@@ -12,6 +12,7 @@ use App\Entity\Education\EducationCurriculum;
 use App\Entity\Education\EducationStudent;
 use App\Entity\Education\EducationTiming;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Message\AbstractMessage;
 use App\Entity\Product\EquipmentList;
 use App\Enum\OnlineRegistration\RegistrationStatusEnum;
 use App\Enum\OnlineRegistration\WishRegistrationEnum;
@@ -60,16 +61,17 @@ class EducationStudentWish
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ?EducationTiming $educationTiming = null;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, cascade: [], orphanRemoval: false)]
     protected Collection $teachers;
 
     #[ORM\ManyToOne(targetEntity: EquipmentList::class, cascade: [])]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected EquipmentList $speciality;
+    protected ?EquipmentList $speciality;
 
     #[ORM\ManyToOne(targetEntity: Course::class, cascade: [], inversedBy: 'educationStudentWishes')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Course $course;
+    protected ?Course $course;
 
     public function __construct()
     {

+ 6 - 6
src/Entity/Awin/Product.php

@@ -92,16 +92,16 @@ class Product
     #[ORM\Column]
     protected mixed $priceMaxi;
 
-    #[ORM\Column(length: 255, options: ['nullable' => true])]
-    protected string $artists;
+    #[ORM\Column(length: 255, nullable: true)]
+    protected ?string $artists;
 
-    #[ORM\Column(length: 255, options: ['nullable' => true])]
-    protected string $uuid;
+    #[ORM\Column(length: 255, nullable: true)]
+    protected ?string $uuid;
 
-    #[ORM\Column(type: 'date', options: ['nullable' => true])]
+    #[ORM\Column(type: 'date', nullable: true)]
     protected ?\DateTimeInterface $createDate;
 
-    #[ORM\Column(type: 'date', options: ['nullable' => true])]
+    #[ORM\Column(type: 'date', nullable: true)]
     protected ?\DateTimeInterface $updateDate;
 
     public function getId(): int

+ 26 - 25
src/Entity/Billing/AbstractBillAccounting.php

@@ -7,6 +7,7 @@ namespace App\Entity\Billing;
 use App\Entity\Access\Access;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
+use App\Entity\Message\AbstractMessage;
 use App\Entity\Organization\Organization;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -39,40 +40,45 @@ abstract class AbstractBillAccounting
 
     #[ORM\ManyToOne(targetEntity: Organization::class)]
     #[ORM\JoinColumn(nullable: true)]
-    protected Organization $organization;
+    protected ?Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillLine::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillLine> */
+    #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billLines;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillCredit::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillCredit> */
+    #[ORM\OneToMany(targetEntity: BillCredit::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billCredits;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillPayment::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillPayment> */
+    #[ORM\OneToMany(targetEntity: BillPayment::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billPayments;
 
     #[ORM\ManyToOne(inversedBy: 'billCredits')]
     #[ORM\JoinColumn(nullable: true)]
-    protected BillAccounting $bill;
+    protected ?AbstractBillAccounting $bill;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillingIntangibleExcludeDate::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillingIntangibleExcludeDate> */
+    #[ORM\OneToMany(targetEntity: BillingIntangibleExcludeDate::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billingIntangibleExcludeDates;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected Pes $pes;
+    protected ?Pes $pes;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected BergerLevrault $bergerLevrault;
+    protected ?BergerLevrault $bergerLevrault;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected Ciril $ciril;
+    protected ?Ciril $ciril;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected Jvs $jvs;
+    protected ?Jvs $jvs;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'billAccountings', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_billAccounting')]
     #[ORM\JoinColumn(name: 'billAccounting_id', referencedColumnName: 'id')]
@@ -84,26 +90,26 @@ abstract class AbstractBillAccounting
     protected Access $access;
 
     #[ORM\OneToOne(targetEntity: BillAccessDetail::class, cascade: ['persist'])]
-    protected BillAccessDetail $accessDetail;
+    protected ?BillAccessDetail $accessDetail;
 
     #[ORM\OneToOne(targetEntity: BillPeriod::class, cascade: ['persist'])]
-    protected BillPeriod $billPeriod;
+    protected ?BillPeriod $billPeriod;
 
     #[ORM\OneToOne(targetEntity: BillTotalDetail::class, cascade: ['persist'])]
-    protected BillTotalDetail $totalDetail;
+    protected ?BillTotalDetail $totalDetail;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
-    #[ORM\ManyToOne(targetEntity: Odyssee::class, inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\ManyToOne(targetEntity: Odyssee::class, cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected Odyssee $odyssee; // TODO: sûr que c'est pas nullable?
 
-    #[ORM\ManyToOne(targetEntity: Afi::class, inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\ManyToOne(targetEntity: Afi::class, cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected Afi $afi;
 
-    #[ORM\ManyToOne(targetEntity: CirilCivil::class, inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\ManyToOne(targetEntity: CirilCivil::class, cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected CirilCivil $cirilCivil;
 
@@ -153,12 +159,7 @@ abstract class AbstractBillAccounting
 
     public function removeBillLine(BillLine $billLine): self
     {
-        if ($this->billLines->removeElement($billLine)) {
-            // set the owning side to null (unless already changed)
-            if ($billLine->getBill() === $this) {
-                $billLine->setBill(null);
-            }
-        }
+        $this->billLines->removeElement($billLine);
 
         return $this;
     }
@@ -223,12 +224,12 @@ abstract class AbstractBillAccounting
         return $this;
     }
 
-    public function getBill(): ?self
+    public function getBill(): ?AbstractBillAccounting
     {
         return $this->bill;
     }
 
-    public function setBill(?self $bill): self
+    public function setBill(?AbstractBillAccounting $bill): self
     {
         $this->bill = $bill;
 

+ 1 - 1
src/Entity/Billing/AccessBilling.php

@@ -51,7 +51,7 @@ class AccessBilling
 
     #[ORM\ManyToOne(targetEntity: BillSchedule::class, cascade: ['persist'], inversedBy: 'accessBilling')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected BillSchedule $billSchedule;
+    protected ?BillSchedule $billSchedule;
 
     public function __construct()
     {

+ 4 - 2
src/Entity/Billing/Afi.php

@@ -6,6 +6,7 @@ namespace App\Entity\Billing;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Core\File;
+use App\Entity\Message\AbstractMessage;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
 
@@ -21,11 +22,12 @@ class Afi
     #[ORM\GeneratedValue]
     private int $id;
 
-    #[ORM\OneToMany(mappedBy: 'afi', targetEntity: Bill::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'afi', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $bills;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function getId(): int
     {

+ 1 - 1
src/Entity/Billing/BergerLevrault.php

@@ -31,7 +31,7 @@ class BergerLevrault
     private Collection $bills;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function __construct()
     {

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

@@ -27,7 +27,7 @@ class BillLine
 
     #[ORM\ManyToOne(inversedBy: 'billLines')]
     #[ORM\JoinColumn(nullable: false)]
-    private BillAccounting $bill;
+    private AbstractBillAccounting $bill;
 
     #[ORM\ManyToOne(inversedBy: 'billLines')]
     private ?Access $access = null;
@@ -43,12 +43,12 @@ class BillLine
         return $this->id;
     }
 
-    public function getBill(): ?AbstractBillAccounting
+    public function getBill(): AbstractBillAccounting
     {
         return $this->bill;
     }
 
-    public function setBill(?AbstractBillAccounting $bill): self
+    public function setBill(AbstractBillAccounting $bill): self
     {
         $this->bill = $bill;
 

+ 7 - 7
src/Entity/Billing/BillPayment.php

@@ -28,7 +28,7 @@ class BillPayment
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billPayments')]
     #[ORM\JoinColumn(nullable: true)]
-    private BillAccounting|null $bill = null;
+    private AbstractBillAccounting|null $bill = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billDetachedPayments')]
     #[ORM\JoinColumn(nullable: true)]
@@ -52,11 +52,11 @@ class BillPayment
 
     #[ORM\ManyToOne(targetEntity: SddBank::class, cascade: ['persist'], inversedBy: 'billPayments')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected SddBank $sddBank;
+    protected ?SddBank $sddBank;
 
     #[ORM\ManyToOne(targetEntity: SddRegie::class, cascade: ['persist'], inversedBy: 'billPayments')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected SddRegie $sddRegie;
+    protected ?SddRegie $sddRegie;
 
     public function __construct()
     {
@@ -159,24 +159,24 @@ class BillPayment
         return $this;
     }
 
-    public function getSddBank(): SddBank
+    public function getSddBank(): ?SddBank
     {
         return $this->sddBank;
     }
 
-    public function setSddBank(SddBank $sddBank): self
+    public function setSddBank(?SddBank $sddBank): self
     {
         $this->sddBank = $sddBank;
 
         return $this;
     }
 
-    public function getSddRegie(): SddRegie
+    public function getSddRegie(): ?SddRegie
     {
         return $this->sddRegie;
     }
 
-    public function setSddRegie(SddRegie $sddRegie): self
+    public function setSddRegie(?SddRegie $sddRegie): self
     {
         $this->sddRegie = $sddRegie;
 

+ 7 - 3
src/Entity/Billing/BillSchedule.php

@@ -6,6 +6,7 @@ namespace App\Entity\Billing;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\AccessWish\AccessWish;
+use App\Entity\Message\AbstractMessage;
 use App\Entity\Organization\Organization;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -26,13 +27,16 @@ class BillSchedule
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'billSchedule', targetEntity: BillScheduleDate::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillScheduleDate> */
+    #[ORM\OneToMany(targetEntity: BillScheduleDate::class, mappedBy: 'billSchedule', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $scheduleDates;
 
-    #[ORM\OneToMany(mappedBy: 'billSchedule', targetEntity: AccessBilling::class, cascade: [], orphanRemoval: false)] // TODO: à revoir
+    /** @var Collection<int, AccessBilling> */
+    #[ORM\OneToMany(targetEntity: AccessBilling::class, mappedBy: 'billSchedule', cascade: [], orphanRemoval: false)] // TODO: à revoir
     protected Collection $accessBilling;
 
-    #[ORM\OneToMany(mappedBy: 'billSchedule', targetEntity: AccessWish::class, cascade: [], orphanRemoval: false)] // TODO: à revoir
+    /** @var Collection<int, AccessWish> */
+    #[ORM\OneToMany(targetEntity: AccessWish::class, mappedBy: 'billSchedule', cascade: [], orphanRemoval: false)] // TODO: à revoir
     protected Collection $accessWishes;
 
     public function getId(): int

+ 6 - 4
src/Entity/Billing/BillingExportSetting.php

@@ -7,6 +7,7 @@ namespace App\Entity\Billing;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Message\AbstractMessage;
 use App\Entity\Organization\Organization;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -29,9 +30,10 @@ class BillingExportSetting
     #[ORM\JoinColumn(nullable: true)]
     private ?SddTeneur $teneur = null;
 
-    #[ORM\OneToOne(inversedBy: 'billingExportSetting', targetEntity: Organization::class, cascade: [])]
-    protected Organization $organization;
+    #[ORM\OneToOne(targetEntity: Organization::class, inversedBy: 'billingExportSetting', cascade: [])]
+    protected ?Organization $organization;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, cascade: [], orphanRemoval: false)]
     protected Collection $stageManagers;
 
@@ -57,12 +59,12 @@ class BillingExportSetting
         return $this;
     }
 
-    public function getOrganization(): Organization
+    public function getOrganization(): ?Organization
     {
         return $this->organization;
     }
 
-    public function setOrganization(Organization $organization): self
+    public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
 

+ 4 - 4
src/Entity/Billing/BillingSetting.php

@@ -41,8 +41,8 @@ class BillingSetting
     #[ORM\OneToMany(targetEntity: FamilyQuotient::class, mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true)]
     private Collection $familyQuotients;
 
-    #[ORM\OneToOne(mappedBy: 'billingSetting', targetEntity: BillingSettingRent::class, cascade: ['persist'])]
-    protected BillingSettingRent $billingSettingRent;
+    #[ORM\OneToOne(targetEntity: BillingSettingRent::class, mappedBy: 'billingSetting', cascade: ['persist'])]
+    protected ?BillingSettingRent $billingSettingRent;
 
     #[Pure]
     public function __construct()
@@ -137,12 +137,12 @@ class BillingSetting
         return $this;
     }
 
-    public function getBillingSettingRent(): BillingSettingRent
+    public function getBillingSettingRent(): ?BillingSettingRent
     {
         return $this->billingSettingRent;
     }
 
-    public function setBillingSettingRent(BillingSettingRent $billingSettingRent): self
+    public function setBillingSettingRent(?BillingSettingRent $billingSettingRent): self
     {
         $this->billingSettingRent = $billingSettingRent;
 

+ 4 - 4
src/Entity/Billing/BillingSettingRent.php

@@ -21,15 +21,15 @@ class BillingSettingRent
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToOne(inversedBy: 'billingSettingRent', targetEntity: BillingSetting::class, cascade: [])]
-    protected BillingSetting $billingSetting;
+    #[ORM\OneToOne(targetEntity: BillingSetting::class, inversedBy: 'billingSettingRent', cascade: [])]
+    protected ?BillingSetting $billingSetting;
 
-    public function getBillingSetting(): BillingSetting
+    public function getBillingSetting(): ?BillingSetting
     {
         return $this->billingSetting;
     }
 
-    public function setBillingSetting(BillingSetting $billingSetting): self
+    public function setBillingSetting(?BillingSetting $billingSetting): self
     {
         $this->billingSetting = $billingSetting;
 

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

@@ -29,7 +29,7 @@ class Ciril
     private Collection $bills;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function __construct()
     {
@@ -71,12 +71,12 @@ class Ciril
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 

+ 6 - 4
src/Entity/Billing/CirilCivil.php

@@ -6,6 +6,7 @@ namespace App\Entity\Billing;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Core\File;
+use App\Entity\Message\AbstractMessage;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
 
@@ -21,11 +22,12 @@ class CirilCivil
     #[ORM\GeneratedValue]
     private int $id;
 
-    #[ORM\OneToMany(mappedBy: 'cirilCivil', targetEntity: Bill::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'cirilCivil', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $bills;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function getId(): int
     {
@@ -61,12 +63,12 @@ class CirilCivil
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 

+ 6 - 7
src/Entity/Billing/FamilyQuotientBand.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Billing;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Message\AbstractMessage;
 use App\Entity\Product\IntangibleDiscountDetail;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -25,15 +26,13 @@ class FamilyQuotientBand
     #[ORM\JoinColumn(nullable: false)]
     protected mixed $familyQuotientModel;
 
-    #[ORM\OneToMany(
-        mappedBy: 'familyQuotientBand',
-        targetEntity: FamilyQuotientBandDetail::class,
-        cascade: ['persist'],
-        orphanRemoval: true,
-    )]
+    /** @var Collection<int, FamilyQuotientBandDetail> */
+//    #[ORM\Column(type: 'string')] // TODO: pourquoi c'est là ça?
+    #[ORM\OneToMany(targetEntity: FamilyQuotientBandDetail::class, mappedBy: 'familyQuotientBand', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $familyQuotientBandDetails;
 
-    #[ORM\OneToMany(mappedBy: 'familyQuotientBand', targetEntity: IntangibleDiscountDetail::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, IntangibleDiscountDetail> */
+    #[ORM\OneToMany(targetEntity: IntangibleDiscountDetail::class, mappedBy: 'familyQuotientBand', cascade: [], orphanRemoval: true)]
     protected Collection $intangibleDiscountDetails;
 
     public function getId(): int

+ 5 - 4
src/Entity/Billing/FamilyQuotientBandDetail.php

@@ -27,9 +27,10 @@ class FamilyQuotientBandDetail
 
     #[ORM\ManyToOne(targetEntity: ResidenceArea::class, cascade: [], inversedBy: 'intangibleDiscountDetails')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected ResidenceArea $residenceArea;
+    protected ?ResidenceArea $residenceArea;
 
-    #[ORM\OneToMany(mappedBy: 'familyQuotientBandDetail', targetEntity: IntangibleDiscountDetail::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, IntangibleDiscountDetail> */
+    #[ORM\OneToMany(targetEntity: IntangibleDiscountDetail::class, mappedBy: 'familyQuotientBandDetail', cascade: [], orphanRemoval: true)]
     protected Collection $intangibleDiscountDetails;
 
     public function getId(): int
@@ -56,12 +57,12 @@ class FamilyQuotientBandDetail
         return $this;
     }
 
-    public function getResidenceArea(): ResidenceArea
+    public function getResidenceArea(): ?ResidenceArea
     {
         return $this->residenceArea;
     }
 
-    public function setResidenceArea(ResidenceArea $residenceArea): self
+    public function setResidenceArea(?ResidenceArea $residenceArea): self
     {
         $this->residenceArea = $residenceArea;
 

+ 4 - 2
src/Entity/Billing/FamilyQuotientModel.php

@@ -26,10 +26,12 @@ class FamilyQuotientModel
     #[ORM\JoinColumn(nullable: false)]
     protected Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'familyQuotientModel', targetEntity: FamilyQuotientBand::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, FamilyQuotientBand> */
+    #[ORM\OneToMany(targetEntity: FamilyQuotientBand::class, mappedBy: 'familyQuotientModel', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $familyQuotientBands;
 
-    #[ORM\OneToMany(mappedBy: 'familyQuotientModel', targetEntity: IntangiblePriceAndDiscount::class, cascade: [], orphanRemoval: false)]
+    /** @var Collection<int, IntangiblePriceAndDiscount> */
+    #[ORM\OneToMany(targetEntity: IntangiblePriceAndDiscount::class, mappedBy: 'familyQuotientModel', cascade: [], orphanRemoval: false)]
     protected Collection $intangiblePriceAndDiscounts;
 
     public function getId(): int

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

@@ -29,7 +29,7 @@ class Jvs
     private Collection $bills;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function __construct()
     {
@@ -71,12 +71,12 @@ class Jvs
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 

+ 5 - 4
src/Entity/Billing/Odyssee.php

@@ -21,11 +21,12 @@ class Odyssee
     #[ORM\GeneratedValue]
     private int $id;
 
-    #[ORM\OneToMany(mappedBy: 'odyssee', targetEntity: Bill::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'odyssee', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $bills;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function getId(): int
     {
@@ -63,12 +64,12 @@ class Odyssee
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 

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

@@ -30,7 +30,7 @@ class Pes
     private Collection $bills;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function __construct()
     {
@@ -72,12 +72,12 @@ class Pes
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 

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

@@ -23,19 +23,19 @@ class PesSetting
     private ?int $id = null;
 
     #[ORM\OneToOne(targetEntity: Organization::class, inversedBy: 'pesSetting', cascade: [])]
-    protected Organization $organization;
+    protected ?Organization $organization;
 
     public function getId(): ?int
     {
         return $this->id;
     }
 
-    public function getOrganization(): Organization
+    public function getOrganization(): ?Organization
     {
         return $this->organization;
     }
 
-    public function setOrganization(Organization $organization): self
+    public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
 

+ 5 - 4
src/Entity/Billing/SddBank.php

@@ -24,11 +24,12 @@ class SddBank
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'sddBank', targetEntity: BillPayment::class, cascade: [], orphanRemoval: false)]
+    /** @var Collection<int, BillPayment> */
+    #[ORM\OneToMany(targetEntity: BillPayment::class, mappedBy: 'sddBank', cascade: [], orphanRemoval: false)]
     protected Collection $billPayments;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function __construct()
     {
@@ -64,12 +65,12 @@ class SddBank
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 

+ 8 - 7
src/Entity/Billing/SddRegie.php

@@ -25,14 +25,15 @@ class SddRegie
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'sddRegie', targetEntity: BillPayment::class, cascade: [], orphanRemoval: false)]
+    /** @var Collection<int, BillPayment> */
+    #[ORM\OneToMany(mappedBy: 'sddRegime', targetEntity: BillPayment::class, cascade: [], orphanRemoval: false)]
     protected Collection $billPayments;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])]
-    protected File $bordereau;
+    protected ?File $bordereau;
 
     public function __construct()
     {
@@ -68,24 +69,24 @@ class SddRegie
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 
         return $this;
     }
 
-    public function getBordereau(): File
+    public function getBordereau(): ?File
     {
         return $this->bordereau;
     }
 
-    public function setBordereau(File $bordereau): self
+    public function setBordereau(?File $bordereau): self
     {
         $this->bordereau = $bordereau;
 

+ 7 - 7
src/Entity/Booking/CalendarSynchro.php

@@ -23,35 +23,35 @@ class CalendarSynchro
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToOne(inversedBy: 'calendarSynchro', targetEntity: Access::class, cascade: ['persist'])]
-    protected Access $access;
+    #[ORM\OneToOne(targetEntity: Access::class, inversedBy: 'calendarSynchro', cascade: ['persist'])]
+    protected ?Access $access;
 
     #[ORM\OneToOne(inversedBy: 'calendarSynchro', targetEntity: File::class, cascade: ['persist'])]
-    protected File $file;
+    protected ?File $file;
 
     public function getId(): ?int
     {
         return $this->id;
     }
 
-    public function getAccess(): Access
+    public function getAccess(): ?Access
     {
         return $this->access;
     }
 
-    public function setAccess(Access $access): self
+    public function setAccess(?Access $access): self
     {
         $this->access = $access;
 
         return $this;
     }
 
-    public function getFile(): File
+    public function getFile(): ?File
     {
         return $this->file;
     }
 
-    public function setFile(File $file): self
+    public function setFile(?File $file): self
     {
         $this->file = $file;
 

+ 5 - 3
src/Entity/Booking/Course.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\AccessWish\EducationStudentWish;
 use App\Entity\Core\Tagg;
@@ -41,11 +42,12 @@ class Course extends AbstractBooking
     #[ORM\OneToMany(targetEntity: CourseRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Course::class, orphanRemoval: true)]
+    /** @var Collection<int, Course> */
+    #[ORM\OneToMany(targetEntity: Course::class, mappedBy: 'parent', orphanRemoval: true)]
     protected Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
-    protected Course $parent;
+    protected ?Course $parent;
 
     #[ORM\ManyToOne(inversedBy: 'courses')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
@@ -104,6 +106,7 @@ class Course extends AbstractBooking
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
     protected Collection $tags;
 
+    /** @var Collection<int, EducationStudentWish> */
     #[ORM\OneToMany(targetEntity: EducationStudentWish::class, mappedBy: 'course', cascade: [], orphanRemoval: false)]
     protected Collection $educationStudentWishes;
 
@@ -119,7 +122,6 @@ class Course extends AbstractBooking
         $this->attendanceBooking = new ArrayCollection();
         $this->tags = new ArrayCollection();
         $this->educationStudentWishes = new ArrayCollection();
-        parent::__construct();
     }
 
     /**

+ 5 - 4
src/Entity/Booking/EducationalProject.php

@@ -9,6 +9,7 @@ use App\Entity\Access\Access;
 use App\Entity\Billing\BillLine;
 use App\Entity\Billing\EducationalProjectIntangible;
 use App\Entity\Billing\EducationalProjectPayer;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
@@ -95,7 +96,6 @@ class EducationalProject extends AbstractBooking
 
     /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'educationalProjectOrganizers')]
-    #[ORM\JoinTable(name: 'booking_organizer')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
     protected Collection $organizer;
@@ -108,8 +108,9 @@ class EducationalProject extends AbstractBooking
     protected Collection $tags;
 
     #[ORM\OneToOne(targetEntity: EducationalProjectAge::class, cascade: ['persist'])]
-    protected EducationalProjectAge $ageDistribution;
+    protected ?EducationalProjectAge $ageDistribution;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'booking_equipment')]
     #[ORM\JoinColumn(name: 'booking_id')]
@@ -491,12 +492,12 @@ class EducationalProject extends AbstractBooking
         return $this;
     }
 
-    public function getAgeDistribution(): EducationalProjectAge
+    public function getAgeDistribution(): ?EducationalProjectAge
     {
         return $this->ageDistribution;
     }
 
-    public function setAgeDistribution(EducationalProjectAge $ageDistribution): self
+    public function setAgeDistribution(?EducationalProjectAge $ageDistribution): self
     {
         $this->ageDistribution = $ageDistribution;
 

+ 10 - 8
src/Entity/Booking/Event.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Categories;
 use App\Entity\Core\File;
@@ -46,27 +47,27 @@ class Event extends AbstractBooking
     protected ?Room $room = null;
 
     /** @var Collection<int, EventRecur> */
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: EventRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $eventRecur;
 
     /** @var Collection<int, Event> */
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Event::class, orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: Event::class, mappedBy: 'parent', orphanRemoval: true)]
     protected Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
-    protected Event $parent;
+    protected ?Event $parent;
 
     #[Assert\Valid]
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'events')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected File $image;
+    protected ?File $image;
 
     #[ORM\ManyToOne]
-    protected EventGender $gender;
+    protected ?EventGender $gender;
 
     /** @var Collection<int, EventUser> */
     #[Assert\Valid]
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventUser::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: EventUser::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $eventUser;
 
     /** @var Collection<int, Categories> */
@@ -74,7 +75,7 @@ class Event extends AbstractBooking
     protected Collection $categories;
 
     /** @var Collection<int, EventReport> */
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventReport::class, orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: EventReport::class, mappedBy: 'event', orphanRemoval: true)]
     protected Collection $eventReports;
 
     /** @var Collection<int, File> */
@@ -86,7 +87,7 @@ class Event extends AbstractBooking
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected PlaceSystem $placeSystem;
+    protected ?PlaceSystem $placeSystem;
 
     /** @var Collection<int, AttendanceBooking> */
     #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
@@ -100,6 +101,7 @@ class Event extends AbstractBooking
     #[ORM\InverseJoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
     protected Collection $organizer;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'booking_equipment')]
     #[ORM\JoinColumn(name: 'booking_id')]

+ 16 - 14
src/Entity/Booking/Examen.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Tagg;
 use App\Entity\Education\Education;
@@ -36,51 +37,58 @@ class Examen extends AbstractBooking
     protected Organization $organization;
 
     /** @var Collection<int, ExamenRecur> */
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: ExamenRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: ExamenRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $eventRecur;
 
     /** @var Collection<int, Examen> */
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Examen::class, orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: Examen::class, mappedBy: 'parent', orphanRemoval: true)]
     protected Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
-    protected Examen $parent;
+    protected ?Examen $parent;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Jury $jury;
+    protected ?Jury $jury;
 
     #[ORM\ManyToOne(inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Education $education;
+    protected ?Education $education;
 
     /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(targetEntity: EducationCurriculum::class, inversedBy: 'examens', cascade: ['persist'])]
     protected Collection $educationCurriculum;
 
     /** @var Collection<int, ExamenConvocation> */
-    #[ORM\OneToMany(mappedBy: 'examen', targetEntity: ExamenConvocation::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: ExamenConvocation::class, mappedBy: 'examen', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $convocation;
 
     /** @var Collection<int, AttendanceBooking> */
-    #[ORM\OneToMany(mappedBy: 'examen', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'examen', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     protected Collection $attendanceBooking;
 
     #[ORM\ManyToOne(inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Place $place;
+    protected ?Place $place;
 
     #[ORM\ManyToOne(inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected ?Room $room = null;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'booking_equipment')]
     #[ORM\JoinColumn(name: 'booking_id')]
     #[ORM\InverseJoinColumn(name: 'equipment_id')]
     protected Collection $equipments;
 
+    /** @var Collection<int, Access> */
+    #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
+    #[ORM\JoinTable(name: 'booking_organizer')]
+    #[ORM\JoinColumn(name: 'booking_id')]
+    protected Collection $organizer;
+
     /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'examens', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
@@ -98,7 +106,6 @@ class Examen extends AbstractBooking
         $this->tags = new ArrayCollection();
         $this->organizer = new ArrayCollection();
         $this->equipments = new ArrayCollection();
-        parent::__construct();
     }
 
     public function getOrganization(): ?Organization
@@ -317,11 +324,6 @@ class Examen extends AbstractBooking
         return $this;
     }
 
-    #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
-    #[ORM\JoinTable(name: 'booking_organizer')]
-    #[ORM\JoinColumn(name: 'booking_id')]
-    protected Collection $organizer;
-
     function getOrganizer(): Collection
     {
         return $this->organizer;

+ 4 - 0
src/Entity/Booking/OrganizationHoliday.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
@@ -33,17 +34,20 @@ class OrganizationHoliday extends AbstractBooking
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'booking_organizer')]
     #[ORM\JoinColumn(name: 'booking_id')]
     protected Collection $organizer;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'booking_equipment')]
     #[ORM\JoinColumn(name: 'booking_id')]
     #[ORM\InverseJoinColumn(name: 'equipment_id')]
     protected Collection $equipments;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'bookings', cascade: ['persist'], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id')]

+ 7 - 3
src/Entity/Booking/PersonHoliday.php

@@ -7,6 +7,7 @@ namespace App\Entity\Booking;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
@@ -26,7 +27,7 @@ use Doctrine\ORM\Mapping as ORM;
 class PersonHoliday extends AbstractBooking
 {
     /** @var Collection<int, PersonHolidayRecur> */
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: PersonHolidayRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: PersonHolidayRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $eventRecur;
 
     #[ORM\ManyToOne(inversedBy: 'holidays')]
@@ -36,17 +37,20 @@ class PersonHoliday extends AbstractBooking
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     protected Organization $organization;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses', cascade: [], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'booking_organizer')]
     #[ORM\JoinColumn(name: 'booking_id')]
     protected Collection $organizer;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'booking_equipment')]
     #[ORM\JoinColumn(name: 'booking_id')]
     #[ORM\InverseJoinColumn(name: 'equipment_id')]
     protected Collection $equipments;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'bookings', cascade: ['persist'], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id')]
@@ -148,7 +152,7 @@ class PersonHoliday extends AbstractBooking
     {
         if (!$this->equipments->contains($equipment)) {
             $this->equipments[] = $equipment;
-            $equipment->addXXXX($this);
+//            $equipment->addXXXX($this); // TODO: compléter
         }
 
         return $this;
@@ -157,7 +161,7 @@ class PersonHoliday extends AbstractBooking
     function removeEquipment(Equipment $equipment): self
     {
         if ($this->equipments->removeElement($equipment)) {
-            $equipment->removeXXXX($this);
+//            $equipment->removeXXXX($this); // TODO: compléter
         }
 
         return $this;

+ 2 - 0
src/Entity/Core/AddressPostal.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Core;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\OrganizationAddressPostal;
 use App\Entity\Person\PersonAddressPostal;
@@ -84,6 +85,7 @@ class AddressPostal
     #[ORM\OneToMany(mappedBy: 'addressPostal', targetEntity: Place::class)]
     private Collection $places;
 
+    /** @var Collection<int, OrganizationAddressPostal> */
     #[ORM\OneToMany(mappedBy: 'addressPostal', targetEntity: OrganizationAddressPostal::class, cascade: [], orphanRemoval: false)]
     protected Collection $organizationAddressPostals;
 

+ 6 - 4
src/Entity/Core/File.php

@@ -10,6 +10,7 @@ use ApiPlatform\Metadata\Get;
 use ApiPlatform\Metadata\Post;
 use ApiPlatform\Metadata\Put;
 use App\Entity\AccessWish\DocumentWish;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Booking\CalendarSynchro;
 use App\Entity\Booking\Event;
 use App\Entity\Booking\EventReport;
@@ -242,11 +243,12 @@ class File
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
     private ?TemplateSystem $templateSystem = null;
 
-    #[ORM\OneToMany(mappedBy: 'image', targetEntity: Network::class)]
+    /** @var Collection<int, Network> */
+    #[ORM\OneToMany(targetEntity: Network::class, mappedBy: 'image')]
     private Collection $networks;
 
     #[ORM\OneToOne(targetEntity: CalendarSynchro::class, mappedBy: 'file')]
-    private CalendarSynchro $calendarSynchro;
+    private ?CalendarSynchro $calendarSynchro;
 
     #[Pure]
     public function __construct()
@@ -781,12 +783,12 @@ class File
         return $this;
     }
 
-    public function getCalendarSynchro(): CalendarSynchro
+    public function getCalendarSynchro(): ?CalendarSynchro
     {
         return $this->calendarSynchro;
     }
 
-    public function setCalendarSynchro(CalendarSynchro $calendarSynchro): self
+    public function setCalendarSynchro(?CalendarSynchro $calendarSynchro): self
     {
         $this->calendarSynchro = $calendarSynchro;
 

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

@@ -31,7 +31,7 @@ class LoginLog
     #[ORM\Column]
     protected mixed $ip;
 
-    #[ORM\Column(type: 'date', options: ['nullable' => true])]
+    #[ORM\Column(type: 'date', nullable: true)]
     protected ?\DateTimeInterface $date;
 
     #[ORM\Column]

+ 9 - 5
src/Entity/Core/Tagg.php

@@ -11,6 +11,7 @@ use App\Entity\Billing\AbstractBillAccounting;
 use App\Entity\Billing\AbstractBillingIntangible;
 use App\Entity\Billing\BillAccounting;
 use App\Entity\Billing\BillPayment;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Booking\AbstractBooking;
 use App\Entity\Booking\Course;
@@ -69,8 +70,8 @@ class Tagg
     #[ORM\ManyToMany(targetEntity: Organization::class, mappedBy: 'tags')]
     protected Collection $organizations;
 
-    /** @var Collection<int, BillAccounting> */
-    #[ORM\ManyToMany(targetEntity: BillAccounting::class, mappedBy: 'tags')]
+    /** @var Collection<int, AbstractBillAccounting> */
+    #[ORM\ManyToMany(targetEntity: AbstractBillAccounting::class, mappedBy: 'tags')]
     protected Collection $billAccountings;
 
     /** @var Collection<int, Equipment> */
@@ -169,21 +170,27 @@ class Tagg
     #[ORM\ManyToMany(targetEntity: Sms::class, mappedBy: 'tags')]
     protected Collection $sms;
 
+    /** @var Collection<int, AbstractProduct> */
     #[ORM\ManyToMany(targetEntity: AbstractProduct::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
     protected Collection $products;
 
+    /** @var Collection<int, AbstractBooking> */
     #[ORM\ManyToMany(targetEntity: AbstractBooking::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
     protected Collection $bookings;
 
+    /** @var Collection<int, AbstractMessage> */
     #[ORM\ManyToMany(targetEntity: AbstractMessage::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
     protected Collection $messages;
 
+    /** @var Collection<int, AbstractRepair> */
     #[ORM\ManyToMany(targetEntity: AbstractRepair::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
     protected Collection $repairs;
 
+    /** @var Collection<int, AbstractControl> */
     #[ORM\ManyToMany(targetEntity: AbstractControl::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
     protected Collection $controls;
 
+    /** @var Collection<int, EducationCurriculumPack> */
     #[ORM\ManyToMany(targetEntity: EducationCurriculumPack::class, mappedBy: 'tags', cascade: [], orphanRemoval: false)]
     protected Collection $educationCurriculumPacks;
 
@@ -295,9 +302,6 @@ class Tagg
         return $this;
     }
 
-    /**
-     * @return Collection<int, AbstractBillAccounting>
-     */
     public function getBillAccountings(): Collection
     {
         return $this->billAccountings;

+ 2 - 0
src/Entity/Education/Cycle.php

@@ -8,6 +8,7 @@ use ApiPlatform\Metadata\ApiResource;
 use ApiPlatform\Metadata\Get;
 use ApiPlatform\Metadata\GetCollection;
 use ApiPlatform\Metadata\Put;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 use App\Enum\Education\CycleEnum;
@@ -67,6 +68,7 @@ class Cycle
     #[ORM\OneToMany(targetEntity: CycleByEducation::class, mappedBy: 'cycle', orphanRemoval: true)]
     private Collection $cycleByEducations;
 
+    /** @var Collection<int, EducationCurriculum> */
     #[ORM\OneToMany(targetEntity: EducationCurriculum::class, mappedBy: 'cycle', cascade: [], orphanRemoval: false)]
     protected Collection $educationCurriculums;
 

+ 2 - 0
src/Entity/Education/Education.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\AccessWish\EducationStudentWish;
 use App\Entity\Booking\Course;
@@ -67,6 +68,7 @@ class Education
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ?EducationNotationConfig $educationNotationConfig = null;
 
+    /** @var Collection<int, EducationStudentWish> */
     #[ORM\OneToMany(targetEntity: EducationStudentWish::class, mappedBy: 'educationWish', cascade: [], orphanRemoval: true)]
     protected Collection $educationWishes;
 

+ 2 - 0
src/Entity/Education/EducationComplement.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use ApiPlatform\Metadata\ApiResource;
@@ -23,6 +24,7 @@ class EducationComplement
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
+    /** @var Collection<int, Education> */
     #[ORM\OneToMany(targetEntity: Education::class, mappedBy: 'educationComplement', cascade: [], orphanRemoval: true)]
     protected Collection $educations;
 

+ 8 - 0
src/Entity/Education/EducationCurriculum.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\ResidenceArea;
 use App\Entity\AccessWish\EducationStudentWish;
 use App\Entity\Booking\Course;
@@ -49,18 +50,23 @@ class EducationCurriculum
     #[ORM\InverseJoinColumn(name: 'educationTiming_id', referencedColumnName: 'id')]
     private Collection $educationTimings;
 
+    /** @var Collection<int, EducationStudentWish> */
     #[ORM\OneToMany(targetEntity: EducationStudentWish::class, mappedBy: 'educationCurriculum', cascade: [], orphanRemoval: false)]
     protected Collection $educationStudentWish;
 
+    /** @var Collection<int, Course> */
     #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'educationCurriculum', cascade: [], orphanRemoval: false)]
     protected Collection $courses;
 
+    /** @var Collection<int, Examen> */
     #[ORM\ManyToMany(targetEntity: Examen::class, mappedBy: 'educationCurriculum', cascade: [], orphanRemoval: false)]
     protected Collection $examens;
 
+    /** @var Collection<int, Intangible> */
     #[ORM\ManyToMany(targetEntity: Intangible::class, mappedBy: 'educationCurriculums', cascade: [], orphanRemoval: false)]
     protected Collection $intangibles;
 
+    /** @var Collection<int, EducationCurriculumPack> */
     #[ORM\ManyToMany(
         targetEntity: EducationCurriculumPack::class,
         mappedBy: 'requiredEducationCurriculums',
@@ -69,6 +75,7 @@ class EducationCurriculum
     )]
     protected Collection $requiredEducationCurriculumPacks;
 
+    /** @var Collection<int, EducationCurriculumPack> */
     #[ORM\ManyToMany(
         targetEntity: EducationCurriculumPack::class,
         mappedBy: 'requiredChoicesEducationCurriculums',
@@ -77,6 +84,7 @@ class EducationCurriculum
     )]
     protected Collection $requiredChoicesEducationCurriculumPacks;
 
+    /** @var Collection<int, EducationCurriculumPack> */
     #[ORM\ManyToMany(
         targetEntity: EducationCurriculumPack::class,
         mappedBy: 'optionnalEducationCurriculums',

+ 6 - 0
src/Entity/Education/EducationCurriculumPack.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
 use App\Entity\Product\Intangible;
@@ -27,9 +28,11 @@ class EducationCurriculumPack
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     public Organization $organization;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educationCurriculumPacks', cascade: ['persist'], orphanRemoval: false)]
     public Collection $tags;
 
+    /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(
         targetEntity: EducationCurriculum::class,
         inversedBy: 'requiredEducationCurriculumPacks',
@@ -38,6 +41,7 @@ class EducationCurriculumPack
     )]
     public Collection $requiredEducationCurriculums;
 
+    /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(
         targetEntity: EducationCurriculum::class,
         inversedBy: 'requiredChoicesEducationCurriculumPacks',
@@ -46,6 +50,7 @@ class EducationCurriculumPack
     )]
     public Collection $requiredChoicesEducationCurriculums;
 
+    /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(
         targetEntity: EducationCurriculum::class,
         inversedBy: 'optionnalEducationCurriculumPacks',
@@ -54,6 +59,7 @@ class EducationCurriculumPack
     )]
     public Collection $optionnalEducationCurriculums;
 
+    /** @var Collection<int, Intangible> */
     #[ORM\ManyToMany(targetEntity: Intangible::class, mappedBy: 'educationCurriculumPacks', cascade: [], orphanRemoval: false)]
     public Collection $intangibles;
 

+ 3 - 3
src/Entity/Education/EducationStudent.php

@@ -65,7 +65,7 @@ class EducationStudent
 
     #[ORM\ManyToOne(targetEntity: EquipmentList::class, cascade: [])]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected EquipmentList $speciality;
+    protected ?EquipmentList $speciality;
 
     public function __construct()
     {
@@ -236,12 +236,12 @@ class EducationStudent
         return $this;
     }
 
-    public function getSpeciality(): EquipmentList
+    public function getSpeciality(): ?EquipmentList
     {
         return $this->speciality;
     }
 
-    public function setSpeciality(EquipmentList $speciality): self
+    public function setSpeciality(?EquipmentList $speciality): self
     {
         $this->speciality = $speciality;
 

+ 5 - 2
src/Entity/Message/AbstractMessage.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Message;
 
 use App\Attribute\OrganizationDefaultValue;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\File;
 use App\Entity\Organization\Organization;
 use App\Enum\Message\MessageStatusEnum;
@@ -15,7 +16,7 @@ use Ramsey\Uuid\Doctrine\UuidGenerator;
 use Ramsey\Uuid\UuidInterface;
 
 /**
- * Classe de base de @see Message, Mail, Sms, Email
+ * Classe de base de @see Mail, Sms, Email
  */
 #[ORM\MappedSuperclass]
 #[OrganizationDefaultValue(fieldName: 'organization')]
@@ -62,13 +63,15 @@ abstract class AbstractMessage
     #[ORM\Column(type: 'text', nullable: true)]
     protected ?string $text = null;
 
+    /** @var Collection<int, File> */
     #[ORM\ManyToMany(targetEntity: File::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinTable(name: 'messages_files')]
     #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id', onDelete: 'cascade')]
     #[ORM\InverseJoinColumn(name: 'file_id', referencedColumnName: 'id', onDelete: 'cascade')]
     protected Collection $files;
 
-    #[ORM\OneToMany(mappedBy: 'message', targetEntity: ReportMessage::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, ReportMessage> */
+    #[ORM\OneToMany(targetEntity: ReportMessage::class, mappedBy: 'message', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $reportMessage;
 
     public function __construct()

+ 2 - 3
src/Entity/Message/AbstractReport.php

@@ -13,7 +13,6 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * TODO: documenter
  */
-#[ORM\MappedSuperclass]
 #[ORM\Table(name: 'ReportMessage')]
 class AbstractReport
 {
@@ -23,10 +22,10 @@ class AbstractReport
     #[ORM\Column(length: 50, enumType: ReportMessageStatusEnum::class)]
     protected ReportMessageStatusEnum $status;
 
-    #[ORM\ManyToOne(targetEntity: Access::class, inversedBy: 'report')]
+    #[ORM\ManyToOne(targetEntity: Access::class, inversedBy: 'reports')]
     protected ?Access $access;
 
-    #[ORM\ManyToOne(targetEntity: Organization::class, inversedBy: 'report')]
+    #[ORM\ManyToOne(targetEntity: Organization::class, inversedBy: 'reports')]
     protected ?Organization $organization;
 
     /**

+ 0 - 118
src/Entity/Message/Message.php

@@ -1,118 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace App\Entity\Message;
-
-use ApiPlatform\Metadata\ApiResource;
-use App\Entity\Access\Access;
-use App\Entity\Core\File;
-use App\Entity\Core\Tagg;
-// use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
-use App\Entity\Education\EducationStudent;
-use Doctrine\Common\Collections\ArrayCollection;
-use Doctrine\Common\Collections\Collection;
-use Doctrine\ORM\Mapping as ORM;
-use Ramsey\Uuid\Uuid;
-
-/**
- * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table Email, et supprimer l'attribut discr.
- * @todo : migration table tag_message
- *
- * TODO: documenter
- */
-// #[Auditable]
-#[ApiResource(operations: [])]
-#[ORM\Entity]
-class Message extends AbstractMessage
-{
-    #[ORM\ManyToOne(inversedBy: 'emails')]
-    #[ORM\JoinColumn(nullable: true)]
-    private ?Access $author = null;
-
-    /** @var Collection<int, ReportEmail> */
-    #[ORM\OneToMany(targetEntity: ReportEmail::class, mappedBy: 'email', cascade: ['persist'], orphanRemoval: true)]
-    #[ORM\JoinColumn(onDelete: 'cascade')]
-    private Collection $reports;
-
-    /** @var Collection<int, Tagg> */
-    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'emails', cascade: ['persist'])]
-    #[ORM\JoinTable(name: 'tag_message')]
-    #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id', onDelete: 'cascade')]
-    #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id', onDelete: 'cascade')]
-    protected Collection $tags;
-
-    public function __construct()
-    {
-        $this->uuid = Uuid::uuid4();
-        $this->reports = new ArrayCollection();
-        $this->tags = new ArrayCollection();
-        parent::__construct();
-    }
-
-    public function getAuthor(): ?Access
-    {
-        return $this->author;
-    }
-
-    public function setAuthor(?Access $author): self
-    {
-        $this->author = $author;
-
-        return $this;
-    }
-
-    /**
-     * @return Collection<int, ReportEmail>
-     */
-    public function getReports(): Collection
-    {
-        return $this->reports;
-    }
-
-    public function addReport(ReportEmail $report): self
-    {
-        if (!$this->reports->contains($report)) {
-            $this->reports[] = $report;
-            $report->setEmail($this);
-        }
-
-        return $this;
-    }
-
-    public function removeReport(ReportEmail $report): self
-    {
-        if ($this->reports->removeElement($report)) {
-            // set the owning side to null (unless already changed)
-            if ($report->getEmail() === $this) {
-                $report->setEmail(null);
-            }
-        }
-
-        return $this;
-    }
-
-    /**
-     * @return Collection<int, Tagg>
-     */
-    public function getTags(): Collection
-    {
-        return $this->tags;
-    }
-
-    public function addTag(Tagg $tag): self
-    {
-        if (!$this->tags->contains($tag)) {
-            $this->tags[] = $tag;
-        }
-
-        return $this;
-    }
-
-    public function removeTag(Tagg $tag): self
-    {
-        $this->tags->removeElement($tag);
-
-        return $this;
-    }
-}

+ 7 - 7
src/Entity/Message/ReportMessage.php

@@ -21,16 +21,16 @@ class ReportMessage
     #[ORM\GeneratedValue]
     private int $id;
 
-    #[ORM\ManyToOne(targetEntity: Message::class, cascade: [], inversedBy: 'reportMessage')]
+    #[ORM\ManyToOne(targetEntity: AbstractMessage::class, cascade: [], inversedBy: 'reportMessage')]
     public mixed $message;
 
     #[ORM\ManyToOne(targetEntity: Access::class, cascade: [])]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    public Access $access;
+    public ?Access $access;
 
     #[ORM\ManyToOne(targetEntity: Organization::class, cascade: [])]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    public Organization $organization;
+    public ?Organization $organization;
 
     public function getId(): int
     {
@@ -56,24 +56,24 @@ class ReportMessage
         return $this;
     }
 
-    public function getAccess(): Access
+    public function getAccess(): ?Access
     {
         return $this->access;
     }
 
-    public function setAccess(Access $access): self
+    public function setAccess(?Access $access): self
     {
         $this->access = $access;
 
         return $this;
     }
 
-    public function getOrganization(): Organization
+    public function getOrganization(): ?Organization
     {
         return $this->organization;
     }
 
-    public function setOrganization(Organization $organization): self
+    public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
 

+ 3 - 3
src/Entity/Network/Network.php

@@ -44,7 +44,7 @@ class Network
     private Collection $organizations;
 
     #[ORM\ManyToOne(targetEntity: File::class, cascade: [], inversedBy: 'networks')]
-    protected File $image;
+    protected ?File $image;
 
     #[Pure]
     public function __construct()
@@ -130,12 +130,12 @@ class Network
         return $this;
     }
 
-    public function getImage(): File
+    public function getImage(): ?File
     {
         return $this->image;
     }
 
-    public function setImage(File $image): self
+    public function setImage(?File $image): self
     {
         $this->image = $image;
 

+ 3 - 3
src/Entity/Organization/Activity.php

@@ -59,7 +59,7 @@ class Activity
     private Collection $tags;
 
     #[ORM\ManyToOne(targetEntity: TypeOfPractice::class, cascade: [])]
-    protected TypeOfPractice $typeOfSection;
+    protected ?TypeOfPractice $typeOfSection;
 
     public function __construct()
     {
@@ -199,12 +199,12 @@ class Activity
         return $this;
     }
 
-    public function getTypeOfSection(): TypeOfPractice
+    public function getTypeOfSection(): ?TypeOfPractice
     {
         return $this->typeOfSection;
     }
 
-    public function setTypeOfSection(TypeOfPractice $typeOfSection): self
+    public function setTypeOfSection(?TypeOfPractice $typeOfSection): self
     {
         $this->typeOfSection = $typeOfSection;
 

+ 4 - 4
src/Entity/Organization/CotisationByYear.php

@@ -25,8 +25,8 @@ class CotisationByYear
     #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id', nullable: false)]
     private Organization $organization;
 
-    #[ORM\OneToOne(mappedBy: 'cotisationByYear', targetEntity: CotisationStaffInfos::class, cascade: ['persist'])]
-    protected CotisationStaffInfos $cotisationStaffInfos;
+    #[ORM\OneToOne(targetEntity: CotisationStaffInfos::class, mappedBy: 'cotisationByYear', cascade: ['persist'])]
+    protected ?CotisationStaffInfos $cotisationStaffInfos;
 
     public function getId(): ?int
     {
@@ -45,12 +45,12 @@ class CotisationByYear
         return $this;
     }
 
-    public function getCotisationStaffInfos(): CotisationStaffInfos
+    public function getCotisationStaffInfos(): ?CotisationStaffInfos
     {
         return $this->cotisationStaffInfos;
     }
 
-    public function setCotisationStaffInfos(CotisationStaffInfos $cotisationStaffInfos): self
+    public function setCotisationStaffInfos(?CotisationStaffInfos $cotisationStaffInfos): self
     {
         $this->cotisationStaffInfos = $cotisationStaffInfos;
 

+ 3 - 3
src/Entity/Organization/CotisationStaffInfos.php

@@ -22,19 +22,19 @@ class CotisationStaffInfos
     private ?int $id = null;
 
     #[ORM\OneToOne(targetEntity: CotisationByYear::class, inversedBy: 'cotisationStaffInfos', cascade: [])]
-    protected CotisationByYear $cotisationByYear;
+    protected ?CotisationByYear $cotisationByYear;
 
     public function getId(): ?int
     {
         return $this->id;
     }
 
-    public function getCotisationByYear(): CotisationByYear
+    public function getCotisationByYear(): ?CotisationByYear
     {
         return $this->cotisationByYear;
     }
 
-    public function setCotisationByYear(CotisationByYear $cotisationByYear): self
+    public function setCotisationByYear(?CotisationByYear $cotisationByYear): self
     {
         $this->cotisationByYear = $cotisationByYear;
 

+ 3 - 3
src/Entity/Organization/OnlineRegistrationDocument.php

@@ -31,7 +31,7 @@ class OnlineRegistrationDocument
 
     #[ORM\ManyToOne(targetEntity: OnlineRegistrationSettings::class, cascade: [], inversedBy: 'adultStudentDocuments')]
     #[ORM\JoinColumn(nullable: true)]
-    protected OnlineRegistrationSettings $adultStudentOnlineRegistrationSettings;
+    protected ?OnlineRegistrationSettings $adultStudentOnlineRegistrationSettings;
 
     public function getId(): ?int
     {
@@ -62,13 +62,13 @@ class OnlineRegistrationDocument
         return $this;
     }
 
-    public function getAdultStudentOnlineRegistrationSettings(): OnlineRegistrationSettings
+    public function getAdultStudentOnlineRegistrationSettings(): ?OnlineRegistrationSettings
     {
         return $this->adultStudentOnlineRegistrationSettings;
     }
 
     public function setAdultStudentOnlineRegistrationSettings(
-        OnlineRegistrationSettings $adultStudentOnlineRegistrationSettings,
+        ?OnlineRegistrationSettings $adultStudentOnlineRegistrationSettings,
     ): self {
         $this->adultStudentOnlineRegistrationSettings = $adultStudentOnlineRegistrationSettings;
 

+ 7 - 5
src/Entity/Organization/OnlineRegistrationSettings.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Organization;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\File;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use App\Entity\Message\ReportSms;
@@ -49,12 +50,13 @@ class OnlineRegistrationSettings
     #[ORM\OneToMany(targetEntity: OnlineRegistrationOpeningPeriod::class, mappedBy: 'onlineRegistrationSettingsNewEnrolments', cascade: ['persist'], orphanRemoval: true)]
     private Collection $openingPeriodsNewEnrolments;
 
-    #[ORM\OneToOne(inversedBy: 'onlineRegistrationSettings', targetEntity: Organization::class, cascade: [])]
-    protected Organization $organization;
+    #[ORM\OneToOne(targetEntity: Organization::class, inversedBy: 'onlineRegistrationSettings', cascade: [])]
+    protected ?Organization $organization;
 
+    /** @var Collection<int, OnlineRegistrationDocument> */
     #[ORM\OneToMany(
-        mappedBy: 'adultStudentOnlineRegistrationSettings',
         targetEntity: OnlineRegistrationDocument::class,
+        mappedBy: 'adultStudentOnlineRegistrationSettings',
         cascade: ['persist'],
         orphanRemoval: true,
     )]
@@ -264,12 +266,12 @@ class OnlineRegistrationSettings
         return $this;
     }
 
-    public function getOrganization(): Organization
+    public function getOrganization(): ?Organization
     {
         return $this->organization;
     }
 
-    public function setOrganization(Organization $organization): self
+    public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
 

+ 57 - 18
src/Entity/Organization/Organization.php

@@ -10,6 +10,7 @@ use App\Entity\Access\Access;
 use App\Entity\Billing\BillingExportSetting;
 use App\Entity\Billing\BillingSetting;
 use App\Entity\Billing\BillSchedule;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Billing\FamilyQuotientModel;
 use App\Entity\Booking\Attendance;
 use App\Entity\Booking\AttendanceBookingReason;
@@ -31,6 +32,7 @@ use App\Entity\Education\EducationNotationConfig;
 use App\Entity\Education\EducationTiming;
 use App\Entity\Education\PeriodNotation;
 use App\Entity\Message\AbstractMessage;
+use App\Entity\Message\AbstractReport;
 use App\Entity\Message\Email;
 use App\Entity\Message\Mail;
 use App\Entity\Message\Sms;
@@ -336,7 +338,7 @@ class Organization
     #[ORM\OneToMany(targetEntity: Commission::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $commissions;
 
-    /** @var Collection<int, Place> */
+    /** @var Collection<int, AbstractPlace> */
     #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AbstractPlace::class, orphanRemoval: true)]
     private Collection $places;
 
@@ -370,39 +372,52 @@ class Organization
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
     private Collection $tags;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: NetworkOrganization::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, NetworkOrganization> */
+    #[ORM\OneToMany(targetEntity: NetworkOrganization::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $network;
 
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: NetworkOrganization::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, NetworkOrganization> */
+    #[ORM\OneToMany(targetEntity: NetworkOrganization::class, mappedBy: 'parent', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $networkChild;
 
-    #[ORM\OneToOne(mappedBy: 'organization', targetEntity: BillingExportSetting::class, cascade: ['persist'])]
-    protected BillingExportSetting $billingExportSetting;
+    #[ORM\OneToOne(targetEntity: BillingExportSetting::class, mappedBy: 'organization', cascade: ['persist'])]
+    protected ?BillingExportSetting $billingExportSetting;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Access::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Access> */
+    #[ORM\OneToMany(targetEntity: Access::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $access;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AbstractMessage::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, AbstractMessage> */
+    #[ORM\OneToMany(targetEntity: AbstractMessage::class, mappedBy: 'organization', cascade: [], orphanRemoval: true)]
     protected Collection $messages;
 
-    #[ORM\OneToOne(mappedBy: 'organization', targetEntity: OnlineRegistrationSettings::class, cascade: ['persist'])]
-    protected OnlineRegistrationSettings $onlineRegistrationSettings;
+    #[ORM\OneToOne(targetEntity: OnlineRegistrationSettings::class, mappedBy: 'organization', cascade: ['persist'])]
+    protected ?OnlineRegistrationSettings $onlineRegistrationSettings;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: CotisationByYear::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, CotisationByYear> */
+    #[ORM\OneToMany(targetEntity: CotisationByYear::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $cotisationByYears;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AttendanceBookingReason::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBookingReason> */
+    #[ORM\OneToMany(targetEntity: AttendanceBookingReason::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $attendanceBookingReasons;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Cycle::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, Cycle> */
+    #[ORM\OneToMany(targetEntity: Cycle::class, mappedBy: 'organization', cascade: [], orphanRemoval: true)]
     protected Collection $educationCurriculumPacks;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: FamilyQuotientModel::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, FamilyQuotientModel> */
+    #[ORM\OneToMany(targetEntity: FamilyQuotientModel::class, mappedBy: 'organization', cascade: [], orphanRemoval: true)]
     protected Collection $familyQuotientModels;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: BillSchedule::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillSchedule> */
+    #[ORM\OneToMany(targetEntity: BillSchedule::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billSchedules;
 
+    /** @var Collection<int, AbstractReport> */
+    #[ORM\OneToMany(targetEntity: AbstractReport::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
+    private Collection $reports;
+
     #[Pure]
     public function __construct()
     {
@@ -2001,12 +2016,12 @@ class Organization
         return $this;
     }
 
-    public function getBillingExportSetting(): BillingExportSetting
+    public function getBillingExportSetting(): ?BillingExportSetting
     {
         return $this->billingExportSetting;
     }
 
-    public function setBillingExportSetting(BillingExportSetting $billingExportSetting): self
+    public function setBillingExportSetting(?BillingExportSetting $billingExportSetting): self
     {
         $this->billingExportSetting = $billingExportSetting;
 
@@ -2037,12 +2052,12 @@ class Organization
         return $this;
     }
 
-    public function getOnlineRegistrationSettings(): OnlineRegistrationSettings
+    public function getOnlineRegistrationSettings(): ?OnlineRegistrationSettings
     {
         return $this->onlineRegistrationSettings;
     }
 
-    public function setOnlineRegistrationSettings(OnlineRegistrationSettings $onlineRegistrationSettings): self
+    public function setOnlineRegistrationSettings(?OnlineRegistrationSettings $onlineRegistrationSettings): self
     {
         $this->onlineRegistrationSettings = $onlineRegistrationSettings;
 
@@ -2168,4 +2183,28 @@ class Organization
 
         return $this;
     }
+
+    public function getReports(): Collection
+    {
+        return $this->reports;
+    }
+
+    public function addReport(AbstractReport $report): self
+    {
+        if (!$this->reports->contains($report)) {
+            $this->reports[] = $report;
+            $report->setOrganization($this);
+        }
+
+        return $this;
+    }
+
+    public function removeReport(AbstractReport $report): self
+    {
+        if ($this->reports->removeElement($report)) {
+            $report->setOrganization(null);
+        }
+
+        return $this;
+    }
 }

+ 6 - 6
src/Entity/Person/AllowedIp.php

@@ -22,10 +22,10 @@ class AllowedIp
 
     #[Assert\NotNull]
     #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'allowedIps')]
-    private Person $person;
+    private ?Person $person;
 
     #[ORM\Column(type: 'string', nullable: true)]
-    private string $ipOrRange;
+    private ?string $ipOrRange;
 
     public function getId(): int
     {
@@ -39,24 +39,24 @@ class AllowedIp
         return $this;
     }
 
-    public function getPerson(): Person
+    public function getPerson(): ?Person
     {
         return $this->person;
     }
 
-    public function setPerson(Person $person): self
+    public function setPerson(?Person $person): self
     {
         $this->person = $person;
 
         return $this;
     }
 
-    public function getIpOrRange(): string
+    public function getIpOrRange(): ?string
     {
         return $this->ipOrRange;
     }
 
-    public function setIpOrRange(string $ipOrRange): self
+    public function setIpOrRange(?string $ipOrRange): self
     {
         $this->ipOrRange = $ipOrRange;
 

+ 4 - 4
src/Entity/Person/Medical.php

@@ -21,20 +21,20 @@ class Medical
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToOne(mappedBy: 'medical', targetEntity: Person::class, cascade: ['persist'], orphanRemoval: true)]
-    private Person $person;
+    #[ORM\OneToOne(targetEntity: Person::class, mappedBy: 'medical', cascade: ['persist'], orphanRemoval: true)]
+    private ?Person $person;
 
     public function getId(): ?int
     {
         return $this->id;
     }
 
-    public function getPerson(): Person
+    public function getPerson(): ?Person
     {
         return $this->person;
     }
 
-    public function setPerson(Person $person): self
+    public function setPerson(?Person $person): self
     {
         $this->person = $person;
 

+ 5 - 3
src/Entity/Person/Person.php

@@ -7,6 +7,7 @@ namespace App\Entity\Person;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\AccessWish\DocumentWish;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\BankAccount;
 use App\Entity\Core\ContactPoint;
 use App\Entity\Core\Country;
@@ -128,8 +129,9 @@ class Person implements UserInterface, PasswordAuthenticatedUserInterface
     private array $confidentiality = [];
 
     #[ORM\OneToOne(targetEntity: Medical::class, inversedBy: 'person', cascade: ['persist'])]
-    private Medical $medical;
+    private ?Medical $medical;
 
+    /** @var Collection<int, AllowedIp> */
     #[ORM\OneToMany(targetEntity: AllowedIp::class, mappedBy: 'person', cascade: ['persist'], orphanRemoval: true)]
     private Collection $allowedIps;
 
@@ -651,12 +653,12 @@ class Person implements UserInterface, PasswordAuthenticatedUserInterface
         return $this;
     }
 
-    public function getMedical(): Medical
+    public function getMedical(): ?Medical
     {
         return $this->medical;
     }
 
-    public function setMedical(Medical $medical): self
+    public function setMedical(?Medical $medical): self
     {
         $this->medical = $medical;
 

+ 23 - 11
src/Entity/Place/AbstractPlace.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Place;
 
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Booking\Course;
 use App\Entity\Booking\EducationalProject;
 use App\Entity\Booking\Event;
@@ -41,11 +42,13 @@ abstract class AbstractPlace
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'places')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private AddressPostal $addressPostal;
+    private ?AddressPostal $addressPostal;
 
-    #[ORM\OneToMany(mappedBy: 'place', targetEntity: Event::class)]
+    /** @var Collection<int, Event> */
+    #[ORM\OneToMany(targetEntity: Event::class, mappedBy: 'place')]
     private Collection $events;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'places', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_place')]
     #[ORM\JoinColumn(name: 'place_id', referencedColumnName: 'id')]
@@ -53,39 +56,48 @@ abstract class AbstractPlace
     private Collection $tags;
 
     #[ORM\ManyToOne(inversedBy: 'places')]
-    private Organization $organization;
+    private ?Organization $organization;
 
+    /** @var Collection<int, ContactPoint> */
     #[ORM\ManyToMany(targetEntity: ContactPoint::class, inversedBy: 'place', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'place_contactpoint')]
     #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id', unique: true)]
     #[ORM\InverseJoinColumn(name: 'place_id', referencedColumnName: 'id')]
     private Collection $contactpoint;
 
-    #[ORM\OneToMany(mappedBy: 'place', targetEntity: Room::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Room> */
+    #[ORM\OneToMany(targetEntity: Room::class, mappedBy: 'place', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $rooms;
 
-    #[ORM\OneToMany(mappedBy: 'place', targetEntity: PlaceControl::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, PlaceControl> */
+    #[ORM\OneToMany(targetEntity: PlaceControl::class, mappedBy: 'place', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $controls;
 
-    #[ORM\OneToMany(mappedBy: 'place', targetEntity: PlaceRepair::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, PlaceRepair> */
+    #[ORM\OneToMany(targetEntity: PlaceRepair::class, mappedBy: 'place', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $repairs;
 
-    #[ORM\OneToMany(mappedBy: 'place', targetEntity: Course::class)]
+    /** @var Collection<int, Course> */
+    #[ORM\OneToMany(targetEntity: Course::class, mappedBy: 'place')]
     private Collection $courses;
 
-    #[ORM\OneToMany(mappedBy: 'place', targetEntity: EducationalProject::class)]
+    /** @var Collection<int, EducationalProject> */
+    #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'place')]
     private Collection $educationalProjects;
 
-    #[ORM\OneToMany(mappedBy: 'place', targetEntity: Examen::class)]
+    /** @var Collection<int, Examen> */
+    #[ORM\OneToMany(targetEntity: Examen::class, mappedBy: 'place')]
     private Collection $examens;
 
-    #[ORM\OneToMany(mappedBy: 'placeStorage', targetEntity: Equipment::class)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'placeStorage')]
     private Collection $equipmentStorages;
 
-    #[ORM\OneToMany(mappedBy: 'placeWhereIsUsed', targetEntity: Equipment::class)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'placeWhereIsUsed')]
     private Collection $equipmentUseds;
 
     public function __construct()

+ 3 - 3
src/Entity/Place/PlaceControl.php

@@ -25,7 +25,7 @@ use Doctrine\ORM\Mapping as ORM;
 class PlaceControl extends AbstractControl
 {
     #[ORM\ManyToOne(inversedBy: 'controls')]
-    protected Place $place;
+    protected ?Place $place;
 
     /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'placeControls', cascade: ['persist'])]
@@ -39,12 +39,12 @@ class PlaceControl extends AbstractControl
         $this->tags = new ArrayCollection();
     }
 
-    public function getPlace(): ?AbstractPlace
+    public function getPlace(): ?Place
     {
         return $this->place;
     }
 
-    public function setPlace(?AbstractPlace $place): self
+    public function setPlace(?Place $place): self
     {
         $this->place = $place;
 

+ 2 - 6
src/Entity/Place/PlaceRepair.php

@@ -42,7 +42,6 @@ class PlaceRepair extends AbstractRepair
     public function __construct()
     {
         $this->tags = new ArrayCollection();
-        parent::__construct();
     }
 
     public function getProvider(): ?Access
@@ -57,21 +56,18 @@ class PlaceRepair extends AbstractRepair
         return $this;
     }
 
-    public function getPlace(): ?AbstractPlace
+    public function getPlace(): ?Place
     {
         return $this->place;
     }
 
-    public function setPlace(?AbstractPlace $place): self
+    public function setPlace(?Place $place): self
     {
         $this->place = $place;
 
         return $this;
     }
 
-    /**
-     * @return Collection<int, Tagg>
-     */
     public function getTags(): Collection
     {
         return $this->tags;

+ 2 - 0
src/Entity/Place/RoomControl.php

@@ -6,6 +6,7 @@ namespace App\Entity\Place;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\AbstractControl;
 use App\Entity\Core\Tagg;
 use Doctrine\Common\Collections\Collection;
@@ -24,6 +25,7 @@ class RoomControl extends AbstractControl
     #[ORM\ManyToOne(inversedBy: 'controls')]
     private ?Room $room = null;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'controls', cascade: ['persist'], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'tag_control')]
     #[ORM\JoinColumn(name: 'control_id')]

+ 2 - 0
src/Entity/Place/RoomRepair.php

@@ -7,6 +7,7 @@ namespace App\Entity\Place;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\AbstractRepair;
 use App\Entity\Core\Tagg;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -30,6 +31,7 @@ class RoomRepair extends AbstractRepair
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ?Access $provider = null;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'repairs', cascade: ['persist'], orphanRemoval: false)]
     #[ORM\JoinTable(name: 'tag_repair')]
     #[ORM\JoinColumn(name: 'repair_id')]

+ 2 - 0
src/Entity/Product/AbstractProduct.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Product;
 
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -29,6 +30,7 @@ abstract class AbstractProduct
     #[ORM\GeneratedValue]
     protected ?int $id = null;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'products', cascade: ['persist'], orphanRemoval: false)]
     protected Collection $tags;
 

+ 6 - 2
src/Entity/Product/Equipment.php

@@ -6,6 +6,7 @@ namespace App\Entity\Product;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Booking\ExamenConvocation;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
@@ -94,12 +95,15 @@ class Equipment extends AbstractProduct
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected ?Access $managerControl = null;
 
-    #[ORM\OneToMany(mappedBy: 'children', targetEntity: EquipmentComposition::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, EquipmentComposition> */
+    #[ORM\OneToMany(targetEntity: EquipmentComposition::class, mappedBy: 'children', cascade: [], orphanRemoval: true)]
     protected Collection $equipmentCompositionChildren;
 
-    #[ORM\OneToMany(mappedBy: 'equipment', targetEntity: EquipmentLoan::class, cascade: [], orphanRemoval: true)]
+    /** @var Collection<int, EquipmentLoan> */
+    #[ORM\OneToMany(targetEntity: EquipmentLoan::class, mappedBy: 'equipment', cascade: [], orphanRemoval: true)]
     protected Collection $equipmentLoanFiltered;
 
+    /** @var Collection<int, ExamenConvocation> */
     #[ORM\ManyToMany(targetEntity: ExamenConvocation::class, mappedBy: 'equipments', cascade: [], orphanRemoval: false)]
     protected Collection $examenConvocations;
 

+ 0 - 1
src/Entity/Product/EquipmentControl.php

@@ -36,7 +36,6 @@ class EquipmentControl extends AbstractControl
     public function __construct()
     {
         $this->tags = new ArrayCollection();
-        parent::__construct();
     }
 
     public function getEquipment(): ?Equipment

+ 14 - 13
src/Entity/Product/Intangible.php

@@ -6,6 +6,7 @@ namespace App\Entity\Product;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Billing\AccessIntangible;
+use App\Entity\Billing\FamilyQuotientBandDetail;
 use App\Entity\Core\Tagg;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use App\Entity\Education\EducationCurriculum;
@@ -38,11 +39,12 @@ class Intangible extends AbstractProduct
     #[ORM\OneToMany(targetEntity: AccessIntangible::class, mappedBy: 'intangible', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $accessIntangibles;
 
+    /** @var Collection<int, EducationCurriculumPack> */
     #[ORM\ManyToMany(targetEntity: EducationCurriculumPack::class, inversedBy: 'intangibles', cascade: [], orphanRemoval: false)]
     protected Collection $educationCurriculumPacks;
 
     #[ORM\OneToOne(targetEntity: IntangiblePriceAndDiscount::class, inversedBy: 'intangible', cascade: ['persist'])]
-    protected IntangiblePriceAndDiscount $intangiblePriceAndDiscount;
+    protected ?IntangiblePriceAndDiscount $intangiblePriceAndDiscount;
 
     public function __construct()
     {
@@ -124,18 +126,6 @@ class Intangible extends AbstractProduct
         return $this->educationCurriculumPacks;
     }
 
-    public function setEducationCurriculumPacks(Collection $educationCurriculumPacks): self
-    {
-        $this->educationCurriculumPacks = $educationCurriculumPacks;
-
-        return $this;
-    }
-
-    public function getIntangiblePriceAndDiscount(): IntangiblePriceAndDiscount
-    {
-        return $this->intangiblePriceAndDiscount;
-    }
-
     public function addEducationCurriculumPack(EducationCurriculumPack $educationCurriculumPack): self
     {
         if (!$this->educationCurriculumPacks->contains($educationCurriculumPack)) {
@@ -154,4 +144,15 @@ class Intangible extends AbstractProduct
 
         return $this;
     }
+
+    public function getIntangiblePriceAndDiscount(): ?IntangiblePriceAndDiscount
+    {
+        return $this->intangiblePriceAndDiscount;
+    }
+
+    public function setIntangiblePriceAndDiscount(?IntangiblePriceAndDiscount $intangiblePriceAndDiscount): self
+    {
+        $this->intangiblePriceAndDiscount = $intangiblePriceAndDiscount;
+        return $this;
+    }
 }

+ 6 - 6
src/Entity/Product/IntangibleDiscountDetail.php

@@ -40,11 +40,11 @@ class IntangibleDiscountDetail
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientBandDetail::class, cascade: [], inversedBy: 'intangibleDiscountDetails')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected FamilyQuotientBandDetail $familyQuotientBandDetail;
+    protected ?FamilyQuotientBandDetail $familyQuotientBandDetail;
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientBand::class, cascade: [], inversedBy: 'intangibleDiscountDetails')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected FamilyQuotientBand $familyQuotientBand;
+    protected ?FamilyQuotientBand $familyQuotientBand;
 
     public function getId(): ?int
     {
@@ -87,24 +87,24 @@ class IntangibleDiscountDetail
         return $this;
     }
 
-    public function getFamilyQuotientBandDetail(): FamilyQuotientBandDetail
+    public function getFamilyQuotientBandDetail(): ?FamilyQuotientBandDetail
     {
         return $this->familyQuotientBandDetail;
     }
 
-    public function setFamilyQuotientBandDetail(FamilyQuotientBandDetail $familyQuotientBandDetail): self
+    public function setFamilyQuotientBandDetail(?FamilyQuotientBandDetail $familyQuotientBandDetail): self
     {
         $this->familyQuotientBandDetail = $familyQuotientBandDetail;
 
         return $this;
     }
 
-    public function getFamilyQuotientBand(): FamilyQuotientBand
+    public function getFamilyQuotientBand(): ?FamilyQuotientBand
     {
         return $this->familyQuotientBand;
     }
 
-    public function setFamilyQuotientBand(FamilyQuotientBand $familyQuotientBand): self
+    public function setFamilyQuotientBand(?FamilyQuotientBand $familyQuotientBand): self
     {
         $this->familyQuotientBand = $familyQuotientBand;
 

+ 6 - 6
src/Entity/Product/IntangiblePriceAndDiscount.php

@@ -36,12 +36,12 @@ class IntangiblePriceAndDiscount
     )]
     private Collection $intangibleDiscountDetails;
 
-    #[ORM\OneToOne(mappedBy: 'intangiblePriceAndDiscount', targetEntity: Intangible::class, cascade: [])]
-    protected Intangible $intangible;
+    #[ORM\OneToOne(targetEntity: Intangible::class, mappedBy: 'intangiblePriceAndDiscount', cascade: [])]
+    protected ?Intangible $intangible;
 
     #[ORM\ManyToOne(targetEntity: FamilyQuotientModel::class, cascade: [], inversedBy: 'intangiblePriceAndDiscounts')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected FamilyQuotientModel $familyQuotientModel;
+    protected ?FamilyQuotientModel $familyQuotientModel;
 
     public function __construct()
     {
@@ -83,19 +83,19 @@ class IntangiblePriceAndDiscount
         return $this;
     }
 
-    public function getIntangible(): Intangible
+    public function getIntangible(): ?Intangible
     {
         return $this->intangible;
     }
 
-    public function setIntangible(Intangible $intangible): self
+    public function setIntangible(?Intangible $intangible): self
     {
         $this->intangible = $intangible;
 
         return $this;
     }
 
-    public function getFamilyQuotientModel(): FamilyQuotientModel
+    public function getFamilyQuotientModel(): ?FamilyQuotientModel
     {
         return $this->familyQuotientModel;
     }

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

@@ -22,7 +22,7 @@ class Token
 
     #[ORM\ManyToOne(targetEntity: Access::class, cascade: [], inversedBy: 'tokens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Access $access;
+    private ?Access $access;
 
     public function getId(): int
     {
@@ -36,12 +36,12 @@ class Token
         return $this;
     }
 
-    public function getAccess(): Access
+    public function getAccess(): ?Access
     {
         return $this->access;
     }
 
-    public function setAccess(Access $access): self
+    public function setAccess(?Access $access): self
     {
         $this->access = $access;