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

@@ -42,6 +42,7 @@ class Notification implements TrackUpdateInterface
private array $addedAddresses = [];
/**
* @var Collection<User>
* @ORM\ManyToMany(targetEntity=User::class)
* @ORM\JoinTable(name="chill_main_notification_addresses_user")
*/
@@ -65,6 +66,7 @@ class Notification implements TrackUpdateInterface
private ?ArrayCollection $addressesOnLoad = null;
/**
* @var Collection<NotificationComment>
* @ORM\OneToMany(targetEntity=NotificationComment::class, mappedBy="notification", orphanRemoval=true)
* @ORM\OrderBy({"createdAt": "ASC"})
*/
@@ -112,6 +114,7 @@ class Notification implements TrackUpdateInterface
private string $title = '';
/**
* @var Collection<User>
* @ORM\ManyToMany(targetEntity=User::class)
* @ORM\JoinTable(name="chill_main_notification_addresses_unread")
*/