public function enterTag(Tag $tag) { if ($tag->hasChilds() || $tag->hasContent()) { return; } if (in_array($tag->getTagName(), $this->autocloseTags)) { $tag->setFlag(Tag::FLAG_SELF_CLOSE); } }