lib/Psc/Doctrine/PhpParser.php
private function parseUseStatement()
    {
        $class = '';
        $alias = '';
        $statements = array();
        $explicitAlias = false;
        while (($token = $this->next())) {
            $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR;
            if (!$explicitAlias && $isNameToken) {
                $class .= $token[1];
                $alias = $token[1];
            } else if ($explicitAlias && $isNameToken) {
                $alias .= $token[1];
            } else if ($token[0] === T_AS) {
                $explicitAlias = true;
                $alias = '';
            } else if ($token === ',') {
                $statements[$alias] = $class;
                $class = '';
                $alias = '';
                $explicitAlias = false;
            } else if ($token === ';') {
                $statements[$alias] = $class;
                break;
            } else {
                break;
            }
        }

        return $statements;
    }
private function parseUseStatement()
    {
        $class = '';
        $alias = '';
        $statements = array();
        $explicitAlias = false;
        while (($token = $this->next())) {
            $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR;
            if (!$explicitAlias && $isNameToken) {
                $class .= $token[1];
                $alias = $token[1];
            } else if ($explicitAlias && $isNameToken) {
                $alias .= $token[1];
            } else if ($token[0] === T_AS) {
                $explicitAlias = true;
                $alias = '';
            } else if ($token === ',') {
                $statements[$alias] = $class;
                $class = '';
                $alias = '';
                $explicitAlias = false;
            } else if ($token === ';') {
                $statements[$alias] = $class;
                break;
            } else {
                break;
            }
        }

        return $statements;
    }
private function parseUseStatement ( ) { $ class = '' ; $ alias = '' ; $ statements = array ( ) ; $ explicitAlias = false ; while ( ( $ token = $ this -> next ( ) ) ) { $ isNameToken = $ token [ 0 ] === T_STRING || $ token [ 0 ] === T_NS_SEPARATOR ; if ( ! $ explicitAlias && $ isNameToken ) { $ class .= $ token [ 1 ] ; $ alias = $ token [ 1 ] ; } else if ( $ explicitAlias && $ isNameToken ) { $ alias .= $ token [ 1 ] ; } else if ( $ token [ 0 ] === T_AS ) { $ explicitAlias = true ; $ alias = '' ; } else if ( $ token === ',' ) { $ statements [ $ alias ] = $ class ; $ class = '' ; $ alias = '' ; $ explicitAlias = false ; } else if ( $ token === ';' ) { $ statements [ $ alias ] = $ class ; break ; } else { break ; } } return $ statements ; }
Parse a single use statement.

@return array A list with all found class names for a use statement.
Parse a single use statement .