public function append(Tag $tag) : Tag
    {
        if ($this->isVoid) {
            throw new \LogicException('Void elements cannot have any contents.');
        }

        $this->content .= $tag->render();

        return $this;
    }
public function append(Tag $tag) : Tag
    {
        if ($this->isVoid) {
            throw new \LogicException('Void elements cannot have any contents.');
        }

        $this->content .= $tag->render();

        return $this;
    }
public function append ( Tag $ tag ) : Tag { if ( $ this -> isVoid ) { throw new \ LogicException ( 'Void elements cannot have any contents.' ) ; } $ this -> content .= $ tag -> render ( ) ; return $ this ; }
Appends a tag to the contents of this tag.

@param Tag $tag The tag to append.

@return Tag This instance, for chaining.

@throws \LogicException If this tag is a void element.
Appends a tag to the contents of this tag .