*/ #[ORM\OneToMany(targetEntity: ReviewComment::class, mappedBy: 'area')] private Collection $comments; public function __construct() { $this->comments = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getReview(): ?Review { return $this->review; } public function setReview(?Review $review): static { $this->review = $review; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): static { $this->title = $title; return $this; } public function getSummary(): ?string { return $this->summary; } public function setSummary(string $summary): static { $this->summary = $summary; return $this; } public function getRisk(): ?ReviewAreaRisk { return $this->risk; } public function setRisk(?ReviewAreaRisk $risk): static { $this->risk = $risk; return $this; } /** * @return Collection */ public function getComments(): Collection { return $this->comments; } public function addComment(ReviewComment $comment): static { if (!$this->comments->contains($comment)) { $this->comments->add($comment); $comment->setArea($this); } return $this; } public function removeComment(ReviewComment $comment): static { if ($this->comments->removeElement($comment)) { // set the owning side to null (unless already changed) if ($comment->getArea() === $this) { $comment->setArea(null); } } return $this; } }