public static function createFromToken(TagToken $token) : Tag
    {
        $tagName = $token->getTagName();
        $attribute = $token->getAttribute();
        return new Tag($tagName, $attribute);
    }
public static function createFromToken(TagToken $token) : Tag
    {
        $tagName = $token->getTagName();
        $attribute = $token->getAttribute();
        return new Tag($tagName, $attribute);
    }
public static function createFromToken ( TagToken $ token ) : Tag { $ tagName = $ token -> getTagName ( ) ; $ attribute = $ token -> getAttribute ( ) ; return new Tag ( $ tagName , $ attribute ) ; }
Creates tag from a tag token.

@param TagToken $token

@return Tag
Creates tag from a tag token .