public function removeSnippet(Snippet $snippet) { if ($this->snippets->contains($snippet)) { $this->snippets->removeElement($snippet); $snippet->removeArticle($this); } return $this; }