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

@@ -33,11 +33,13 @@ use Symfony\Component\Serializer\Annotation as Serializer;
class Result
{
/**
* @var Collection<AccompanyingPeriodWorkGoal>
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWorkGoal::class, mappedBy="results")
*/
private Collection $accompanyingPeriodWorkGoals;
/**
* @var Collection<AccompanyingPeriodWork>
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWork::class, mappedBy="results")
*/
private Collection $accompanyingPeriodWorks;
@@ -48,6 +50,7 @@ class Result
private ?DateTime $desactivationDate = null;
/**
* @var Collection<Goal>
* @ORM\ManyToMany(targetEntity=Goal::class, mappedBy="results")
*/
private Collection $goals;
@@ -61,6 +64,7 @@ class Result
private ?int $id = null;
/**
* @var Collection<SocialAction>
* @ORM\ManyToMany(targetEntity=SocialAction::class, mappedBy="results")
*/
private Collection $socialActions;