PHP Class Phan\Analysis\ScopeVisitor

Inheritance: extends Phan\AST\Visitor\KindVisitorImplementation
Show file Open project: etsy/phan Class Usage Examples

Public Methods

Method Description
__construct ( CodeBase $code_base, Context $context )
visit ( ast\Node $node ) : Context Default visitor for node kinds that do not have an overriding method
visitDeclare ( ast\Node $node ) : Context Visit a node with kind \ast\AST_DECLARE
visitGroupUse ( ast\Node $node ) : Context Visit a node with kind \ast\AST_GROUP_USE such as use \ast\Node;.
visitNamespace ( ast\Node $node ) : Context Visit a node with kind \ast\AST_NAMESPACE
visitUse ( ast\Node $node ) : Context Visit a node with kind \ast\AST_USE such as use \ast\Node;.

Private Methods

Method Description
aliasTargetMapFromUseNode ( ast\Node $node, string $prefix = '' ) : array

Method Details

__construct() public method

public __construct ( CodeBase $code_base, Context $context )
$code_base Phan\CodeBase The global code base holding all state
$context Phan\Language\Context The context of the parser at the node for which we'd like to determine a type

visit() public method

Default visitor for node kinds that do not have an overriding method
public visit ( 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

visitDeclare() public method

Visit a node with kind \ast\AST_DECLARE
public visitDeclare ( 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

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

visitNamespace() public method

Visit a node with kind \ast\AST_NAMESPACE
public visitNamespace ( 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

visitUse() public method

Visit a node with kind \ast\AST_USE such as use \ast\Node;.
public visitUse ( 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