/** * Add tag * * The original string tag logic used array_unique to avoid tag duplication. * * @param Tag|EmbeddedTag $tag */ public function addTag($tag) { if (!$this->containsTag($tag)) { $embedTag = EmbeddedTag::getEmbeddedTag($this->tags, $tag); $this->tags[] = $embedTag; return true; } return false; }