Apply rector changes to Collection typing

This commit is contained in:
2024-08-27 16:20:30 +02:00
parent 85e2466611
commit ad47804c91
31 changed files with 86 additions and 85 deletions

View File

@@ -92,7 +92,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
* This list is computed by a materialized view. It won't be populated until a refresh is done
* on the materialized view.
*
* @var Collection<GeographicalUnit>
* @var Collection<int, GeographicalUnit>
*
* @readonly
*/

View File

@@ -21,9 +21,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
class Center implements HasCenterInterface, \Stringable
{
/**
* @var Collection<GroupCenter>
* @var Collection<int, GroupCenter>
*/
#[ORM\OneToMany(targetEntity: GroupCenter::class, mappedBy: 'center')]
#[ORM\OneToMany(mappedBy: 'center', targetEntity: GroupCenter::class)]
private Collection $groupCenters;
#[Serializer\Groups(['docgen:read'])]
@@ -40,7 +40,7 @@ class Center implements HasCenterInterface, \Stringable
private bool $isActive = true;
/**
* @var Collection<Regroupment>
* @var Collection<int, Regroupment>
*/
#[ORM\ManyToMany(targetEntity: Regroupment::class, mappedBy: 'centers')]
private Collection $regroupments;

View File

@@ -36,9 +36,9 @@ class GeographicalUnitLayer
private string $refId = '';
/**
* @var Collection<GeographicalUnit>
* @var Collection<int, GeographicalUnit>
*/
#[ORM\OneToMany(targetEntity: GeographicalUnit::class, mappedBy: 'layer')]
#[ORM\OneToMany(mappedBy: 'layer', targetEntity: GeographicalUnit::class)]
private Collection $units;
public function __construct()

View File

@@ -34,7 +34,7 @@ class GroupCenter
private ?PermissionsGroup $permissionsGroup = null;
/**
* @var Collection<User::class>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class, mappedBy: 'groupCenters')]
private Collection $users;

View File

@@ -30,7 +30,7 @@ class Notification implements TrackUpdateInterface
private array $addedAddresses = [];
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_notification_addresses_user')]
@@ -54,9 +54,9 @@ class Notification implements TrackUpdateInterface
private ?ArrayCollection $addressesOnLoad = null;
/**
* @var Collection<NotificationComment>
* @var Collection<int, NotificationComment>
*/
#[ORM\OneToMany(targetEntity: NotificationComment::class, mappedBy: 'notification', orphanRemoval: true)]
#[ORM\OneToMany(mappedBy: 'notification', targetEntity: NotificationComment::class, orphanRemoval: true)]
#[ORM\OrderBy(['createdAt' => \Doctrine\Common\Collections\Criteria::ASC])]
private Collection $comments;
@@ -88,7 +88,7 @@ class Notification implements TrackUpdateInterface
private string $title = '';
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_notification_addresses_unread')]

View File

@@ -28,9 +28,9 @@ class PermissionsGroup
private array $flags = [];
/**
* @var Collection<GroupCenter>
* @var Collection<int, GroupCenter>
*/
#[ORM\OneToMany(targetEntity: GroupCenter::class, mappedBy: 'permissionsGroup')]
#[ORM\OneToMany(mappedBy: 'permissionsGroup', targetEntity: GroupCenter::class)]
private Collection $groupCenters;
#[ORM\Id]
@@ -42,7 +42,7 @@ class PermissionsGroup
private string $name = '';
/**
* @var Collection<RoleScope>
* @var Collection<int, RoleScope>
*/
#[ORM\ManyToMany(targetEntity: RoleScope::class, inversedBy: 'permissionsGroups', cascade: ['persist'])]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]

View File

@@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM;
class Regroupment
{
/**
* @var Collection<Center>
* @var Collection<int, Center>
*/
#[ORM\ManyToMany(targetEntity: Center::class, inversedBy: 'regroupments')]
#[ORM\Id]

View File

@@ -26,7 +26,7 @@ class RoleScope
private ?int $id = null;
/**
* @var Collection<PermissionsGroup>
* @var Collection<int, PermissionsGroup>
*/
#[ORM\ManyToMany(targetEntity: PermissionsGroup::class, mappedBy: 'roleScopes')]
private Collection $permissionsGroups;

View File

@@ -42,9 +42,9 @@ class Scope
private array $name = [];
/**
* @var Collection<RoleScope>
* @var Collection<int, RoleScope>
*/
#[ORM\OneToMany(targetEntity: RoleScope::class, mappedBy: 'scope')]
#[ORM\OneToMany(mappedBy: 'scope', targetEntity: RoleScope::class)]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private Collection $roleScopes;

View File

@@ -82,12 +82,12 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
private int $relatedEntityId;
/**
* @var ArrayCollection<int, EntityWorkflowStep>
* @var Collection<int, EntityWorkflowStep>
*/
#[Assert\Valid(traverse: true)]
#[ORM\OneToMany(mappedBy: 'entityWorkflow', targetEntity: EntityWorkflowStep::class, cascade: ['persist'], orphanRemoval: true)]
#[ORM\OrderBy(['transitionAt' => \Doctrine\Common\Collections\Criteria::ASC, 'id' => 'ASC'])]
private ArrayCollection $steps;
private Collection $steps;
/**
* @var array|EntityWorkflowStep[]|null

View File

@@ -26,7 +26,7 @@ class EntityWorkflowStep
private string $accessKey;
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_cc_user')]
@@ -42,14 +42,14 @@ class EntityWorkflowStep
private array $destEmail = [];
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user')]
private Collection $destUser;
/**
* @var Collection<User>
* @var Collection<int, User>
*/
#[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user_by_accesskey')]