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

@@ -69,7 +69,7 @@ class RecurringTask extends AbstractTask
private $occurenceWarningInterval;
/**
* @var Collection
* @var Collection<SingleTask>
*
* @ORM\OneToMany(
* targetEntity="SingleTask",

View File

@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\TaskBundle\Entity;
use Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent;
use DateInterval;
use DateTime;
use DateTimeImmutable;
@@ -92,14 +93,14 @@ class SingleTask extends AbstractTask
private $startDate;
/**
* @var \Doctrine\Common\Collections\Collection
* @var Collection<SingleTaskPlaceEvent>
* @ORM\OneToMany(
* targetEntity="\Chill\TaskBundle\Entity\Task\SingleTaskPlaceEvent",
* mappedBy="task",
* cascade={ "remove" }
* )
*/
private $taskPlaceEvents;
private Collection $taskPlaceEvents;
/**
* @var DateInterval