DX: type-hing oneToMany and ManyToMany properties as collection

This commit is contained in:
2023-07-19 16:21:17 +02:00
parent 224c2c74e8
commit 075aca493b
32 changed files with 130 additions and 73 deletions

View File

@@ -132,7 +132,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
private ?string $canonicalized = '';
/**
* @var ThirdPartyCategory
* @var Collection<ThirdPartyCategory>
* @ORM\ManyToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyCategory")
* @ORM\JoinTable(name="chill_3party.thirdparty_category",
* joinColumns={@ORM\JoinColumn(name="thirdparty_id", referencedColumnName="id")},
@@ -143,6 +143,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
private Collection $categories;
/**
* @var Collection<Center>
* @ORM\ManyToMany(targetEntity="\Chill\MainBundle\Entity\Center")
* @ORM\JoinTable(name="chill_3party.party_center")
*/
@@ -154,7 +155,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
* @ORM\OneToMany(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty", mappedBy="parent",
* cascade={"persist"}, orphanRemoval=true)
*
* @var Collection<(int|string), ThirdParty>
* @var Collection<ThirdParty>
* @Assert\Valid(traverse=true)
*/
private Collection $children;