fixed: add required type-hinting to AccompanyingPeriodComment, necessary

for docgen rendering
This commit is contained in:
Julien Fastré 2022-07-12 18:15:16 +02:00
parent 8809abedf6
commit 83ee3c7cfd

View File

@ -36,7 +36,7 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
* inversedBy="comments")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $accompanyingPeriod;
private ?AccompanyingPeriod $accompanyingPeriod;
/**
* @ORM\Column(type="text")
@ -44,20 +44,20 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
* @Assert\NotBlank
* @Assert\NotNull
*/
private $content;
private ?string $content;
/**
* @ORM\Column(type="datetime")
* @Groups({"read", "docgen:read"})
*/
private $createdAt;
private ?DateTimeInterface $createdAt;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
* @Groups({"read", "docgen:read"})
*/
private $creator;
private ?User $creator;
/**
* @ORM\Id
@ -65,20 +65,20 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
* @ORM\Column(type="integer")
* @Groups({"read", "docgen:read"})
*/
private $id;
private ?int $id;
/**
* @ORM\Column(type="datetime")
* @Groups({"read"})
*/
private $updatedAt;
private ?DateTimeInterface $updatedAt;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
* @Groups({"read"})
*/
private $updatedBy;
private ?User $updatedBy;
public function getAccompanyingPeriod(): ?AccompanyingPeriod
{