tags = new ArrayCollection(); } public function getId(): ?int { return $this->id; } function getTags(): Collection { return $this->tags; } function addTag(Tagg $tag): self { if (!$this->tags->contains($tag)) { $this->tags[] = $tag; $tag->addRepair($this); } return $this; } function removeTag(Tagg $tag): self { if ($this->tags->removeElement($tag)) { $tag->removeRepair($this); } return $this; } }