children = new ArrayCollection(); } public function getId(): ?Ulid { return $this->id; } public function getSnip(): ?Snip { return $this->snip; } public function setSnip(?Snip $snip): self { $this->snip = $snip; return $this; } public function getParent(): ?self { return $this->parent; } public function setParent(?self $parent): self { $this->parent = $parent; return $this; } /** * @return Collection */ public function getChildren(): Collection { return $this->children; } public function addChild(self $child): self { if (!$this->children->contains($child)) { $this->children->add($child); $child->setParent($this); } return $this; } public function removeChild(self $child): self { if ($this->children->removeElement($child)) { // set the owning side to null (unless already changed) if ($child->getParent() === $this) { $child->setParent(null); } } return $this; } public function getText(): ?string { return $this->text; } public function setText(?string $text): self { $this->text = $text; return $this; } public function getDiff(): ?array { return $this->diff; } public function setDiff(?array $diff): static { $this->diff = $diff; return $this; } public function getName(): ?string { return $this->name; } public function setName(?string $name): static { $this->name = $name; return $this; } }