PHP Class Phan\Analysis\PostOrderAnalysisVisitor

Inheritance: extends Phan\AST\AnalysisVisitor
Show file Open project: etsy/phan

Public Methods

Method Description
__construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null )
visit ( ast\Node $node ) : Context Default visitor for node kinds that do not have an overriding method
visitArray ( ast\Node $node ) : Context
visitAssign ( ast\Node $node ) : Context
visitAssignRef ( ast\Node $node ) : Context
visitCall ( ast\Node $node ) : Context
visitClassConst ( ast\Node $node ) : Context
visitClosure ( ast\Node\Decl $node ) : Context
visitConst ( ast\Node $node ) : Context
visitDim ( ast\Node $node ) : Context Visit a node with kind \ast\AST_DIM
visitDoWhile ( ast\Node $node ) : Context
visitEcho ( ast\Node $node ) : Context
visitEncapsList ( ast\Node $node ) : Context
visitExprList ( ast\Node $node ) : Context
visitForeach ( ast\Node $node ) : Context
visitFuncDecl ( ast\Node\Decl $node ) : Context Visit a node with kind \ast\AST_FUNC_DECL
visitGlobal ( ast\Node $node ) : Context Visit a node with kind \ast\AST_GLOBAL
visitIfElem ( ast\Node $node ) : Context
visitInstanceof ( ast\Node $node ) : Context
visitList ( ast\Node $node ) : Context
visitMethod ( ast\Node\Decl $node ) : Context
visitMethodCall ( ast\Node $node ) : Context
visitNew ( ast\Node $node ) : Context
visitPrint ( ast\Node $node ) : Context
visitProp ( ast\Node $node ) : Context Visit a node with kind \ast\AST_PROP
visitPropDecl ( ast\Node $node ) : Context
visitReturn ( ast\Node $node ) : Context
visitStatic ( ast\Node $node ) : Context
visitStaticCall ( ast\Node $node ) : Context
visitStaticProp ( ast\Node $node ) : Context
visitSwitch ( ast\Node $node ) : Context
visitSwitchCase ( ast\Node $node ) : Context
visitVar ( ast\Node $node ) : Context
visitWhile ( ast\Node $node ) : Context

Private Methods

Method Description
analyzeCallToMethod ( CodeBase $code_base, Phan\Language\Element\FunctionInterface $method, ast\Node $node ) : null Analyze the parameters and arguments for a call to the given method or function
analyzeNoOp ( ast\Node $node, string $issue_type ) : null
declOnlyThrows ( ast\Node\Decl $node ) : boolean

Method Details

__construct() public method

public __construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null )
$code_base Phan\CodeBase A code base needs to be passed in because we require it to be initialized before any classes or files are loaded.
$context Phan\Language\Context The context of the parser at the node for which we'd like to determine a type
$parent_node ast\Node The parent node of the node being analyzed

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

visitArray() public method

public visitArray ( 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

visitAssign() public method

public visitAssign ( 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

visitAssignRef() public method

public visitAssignRef ( 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

visitCall() public method

public visitCall ( 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

visitClassConst() public method

public visitClassConst ( 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

visitClosure() public method

public visitClosure ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitConst() public method

public visitConst ( 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

visitDim() public method

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

visitDoWhile() public method

public visitDoWhile ( 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

visitEcho() public method

public visitEcho ( 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

visitEncapsList() public method

public visitEncapsList ( 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

visitExprList() public method

public visitExprList ( 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

visitForeach() public method

public visitForeach ( 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

visitFuncDecl() public method

Visit a node with kind \ast\AST_FUNC_DECL
public visitFuncDecl ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitGlobal() public method

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

visitIfElem() public method

public visitIfElem ( 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

visitInstanceof() public method

public visitInstanceof ( 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

visitList() public method

public visitList ( 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

visitMethod() public method

public visitMethod ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl A node to parse
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitMethodCall() public method

public visitMethodCall ( 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

visitNew() public method

public visitNew ( 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

visitPrint() public method

public visitPrint ( 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

visitProp() public method

Visit a node with kind \ast\AST_PROP
public visitProp ( ast\Node $node ) : Context
$node ast\Node A node of the type indicated by the method name that we'd like to figure out the type that it produces.
return Phan\Language\Context A new or an unchanged context resulting from parsing the node

visitPropDecl() public method

public visitPropDecl ( 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

visitReturn() public method

public visitReturn ( 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

visitStatic() public method

public visitStatic ( 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

visitStaticCall() public method

public visitStaticCall ( 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

visitStaticProp() public method

public visitStaticProp ( ast\Node $node ) : Context
$node ast\Node
return Phan\Language\Context

visitSwitch() public method

public visitSwitch ( 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

visitSwitchCase() public method

public visitSwitchCase ( 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

visitVar() public method

public visitVar ( 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

visitWhile() public method

public visitWhile ( 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