Phan\Analysis\ScopeVisitor::visitGroupUse PHP Method

visitGroupUse() public method

Visit a node with kind \ast\AST_GROUP_USE such as use \ast\Node;.
public visitGroupUse ( ast\Node $node ) : Context
$node ast\Node A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node
    public function visitGroupUse(Node $node) : Context
    {
        $children = $node->children ?? [];
        $prefix = array_shift($children);
        $context = $this->context;
        foreach ($this->aliasTargetMapFromUseNode($children['uses'], $prefix) as $alias => $map) {
            list($flags, $target) = $map;
            $context = $context->withNamespaceMap($flags, $alias, $target);
        }
        return $context;
    }