public static function extractVarType($comments = '')
    {
        $type = 'string';
        preg_match('/@var\ (.*) (.*)\n/i', $comments, $varType);
        if (count($varType)) {
            $aux = trim($varType[1]);
            $type = str_replace(' ', '', strlen($aux) > 0 ? $varType[1] : $varType[2]);
        }

        return $type;
    }
public static function extractVarType($comments = '')
    {
        $type = 'string';
        preg_match('/@var\ (.*) (.*)\n/i', $comments, $varType);
        if (count($varType)) {
            $aux = trim($varType[1]);
            $type = str_replace(' ', '', strlen($aux) > 0 ? $varType[1] : $varType[2]);
        }

        return $type;
    }
public static function extractVarType ( $ comments = '' ) { $ type = 'string' ; preg_match ( '/@var\ (.*) (.*)\n/i' , $ comments , $ varType ) ; if ( count ( $ varType ) ) { $ aux = trim ( $ varType [ 1 ] ) ; $ type = str_replace ( ' ' , '' , strlen ( $ aux ) > 0 ? $ varType [ 1 ] : $ varType [ 2 ] ) ; } return $ type ; }
Method that extract the type of a variable

@param string $comments

@return string
Method that extract the type of a variable