Cherry-pick phpstan fixes after rector changes

This commit is contained in:
2024-08-27 15:57:10 +02:00
parent 94d6b5eff8
commit 85e2466611
7 changed files with 69 additions and 64 deletions

View File

@@ -103,7 +103,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private int $dateTimeVersion = 0;
/**
* @var Collection<CalendarDoc>
* @var Collection<int, \Chill\CalendarBundle\Entity\CalendarDoc>
*/
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: CalendarDoc::class, orphanRemoval: true)]
private Collection $documents;
@@ -120,12 +120,12 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private ?int $id = null;
/**
* @var Collection&Selectable<int, Invite>
* @var ArrayCollection<int, Invite>
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: Invite::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_invites')]
private Collection&Selectable $invites;
private Collection $invites;
#[Serializer\Groups(['read', 'docgen:read'])]
#[Assert\NotNull(message: 'calendar.A location is required')]
@@ -143,7 +143,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private ?Person $person = null;
/**
* @var Collection<Person>
* @var Collection<int, Person>
*/
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
#[Assert\Count(min: 1, minMessage: 'calendar.At least {{ limit }} person is required.')]
@@ -157,7 +157,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private PrivateCommentEmbeddable $privateComment;
/**
* @var Collection<ThirdParty>
* @var Collection<int, ThirdParty>
*/
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: ThirdParty::class)]