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

@@ -32,14 +32,13 @@ class PermissionsGroup
private $flags = [];
/**
* @var Collection
*
* @var Collection<GroupCenter>
* @ORM\OneToMany(
* targetEntity="Chill\MainBundle\Entity\GroupCenter",
* mappedBy="permissionsGroup"
* )
*/
private $groupCenters;
private Collection $groupCenters;
/**
* @var int
@@ -58,15 +57,14 @@ class PermissionsGroup
private $name;
/**
* @var Collection
*
* @var Collection<RoleScope>
* @ORM\ManyToMany(
* targetEntity="Chill\MainBundle\Entity\RoleScope",
* inversedBy="permissionsGroups",
* cascade={ "persist" })
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
private $roleScopes;
private Collection $roleScopes;
/**
* PermissionsGroup constructor.