src/ReflectionFileNamespace.php
private function findNamespaceAliases()
    {
        $namespaceAliases = [];

        // aliases can be only top-level nodes in the namespace, so we can scan them directly
        foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
            if ($namespaceLevelNode instanceof Use_) {
                $useAliases = $namespaceLevelNode->uses;
                if (!empty($useAliases)) {
                    foreach ($useAliases as $useNode) {
                        $namespaceAliases[$useNode->name->toString()] = $useNode->alias;
                    }
                }
            }
        }

        return $namespaceAliases;
    }
private function findNamespaceAliases()
    {
        $namespaceAliases = [];

        // aliases can be only top-level nodes in the namespace, so we can scan them directly
        foreach ($this->namespaceNode->stmts as $namespaceLevelNode) {
            if ($namespaceLevelNode instanceof Use_) {
                $useAliases = $namespaceLevelNode->uses;
                if (!empty($useAliases)) {
                    foreach ($useAliases as $useNode) {
                        $namespaceAliases[$useNode->name->toString()] = $useNode->alias;
                    }
                }
            }
        }

        return $namespaceAliases;
    }
private function findNamespaceAliases ( ) { $ namespaceAliases = [ ] ; // aliases can be only top-level nodes in the namespace, so we can scan them directly foreach ( $ this -> namespaceNode -> stmts as $ namespaceLevelNode ) { if ( $ namespaceLevelNode instanceof Use_ ) { $ useAliases = $ namespaceLevelNode -> uses ; if ( ! empty ( $ useAliases ) ) { foreach ( $ useAliases as $ useNode ) { $ namespaceAliases [ $ useNode -> name -> toString ( ) ] = $ useNode -> alias ; } } } } return $ namespaceAliases ; }
Searchse for namespace aliases for the current block

@return array
Searchse for namespace aliases for the current block