protected function getTypeFromTag(File $file, $tagIndex)
    {
        $content = $file->getTokens()[($tagIndex + 2)]['content'];
        $parts   = explode(' ', $content, 2);
        $type    = $parts[0];
        return $type;
    }
protected function getTypeFromTag(File $file, $tagIndex)
    {
        $content = $file->getTokens()[($tagIndex + 2)]['content'];
        $parts   = explode(' ', $content, 2);
        $type    = $parts[0];
        return $type;
    }
protected function getTypeFromTag ( File $ file , $ tagIndex ) { $ content = $ file -> getTokens ( ) [ ( $ tagIndex + 2 ) ] [ 'content' ] ; $ parts = explode ( ' ' , $ content , 2 ) ; $ type = $ parts [ 0 ] ; return $ type ; }
Gets the type from a tag.

@param File $file
@param int  $tagIndex

@return string
Gets the type from a tag .