PHP Class Phan\BlockAnalysisVisitor

Inheritance: extends Phan\AST\AnalysisVisitor
Afficher le fichier Open project: etsy/phan

Méthodes publiques

Méthode Description
__construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
__construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
visit ( ast\Node $node ) : Context For non-special nodes, we propagate the context and scope from the parent, through the children and return the modified scope
visitBranchedContext ( ast\Node $node ) : Context For nodes that are the root of mutually exclusive child nodes (if, try), we analyze each child in the parent context and then merge them together to try to guess what happens after the branching finishes.
visitCatchList ( ast\Node $node ) : Context
visitClass ( ast\Node\Decl $node ) : Context
visitClosedContext ( ast\Node $node ) : Context For 'closed context' items (classes, methods, functions, closures), we analyze children in the parent context, but then return the parent context itself unmodified by the children.
visitClosure ( ast\Node\Decl $node ) : Context
visitFuncDecl ( ast\Node\Decl $node ) : Context
visitIf ( ast\Node $node ) : Context
visitIfElem ( ast\Node $node ) : Context
visitMethod ( ast\Node\Decl $node ) : Context
visitTry ( ast\Node $node ) : Context

Method Details

__construct() public méthode

public __construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
$code_base CodeBase The code base within which we're operating
$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 of the node being analyzed
$depth integer The depth of the node being analyzed in the AST

__construct() public méthode

public __construct ( CodeBase $code_base, Context $context, ast\Node $parent_node = null, integer $depth )
$code_base CodeBase The code base within which we're operating
$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 of the node being analyzed
$depth integer The depth of the node being analyzed in the AST

visit() public méthode

│ ▼ ┌──● │ ●──●──● │ ●──┘ │ ▼
public visit ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitBranchedContext() public méthode

│ ▼ ┌──●──┐ │ │ │ ● ● ● │ │ │ └──●──┘ │ ▼
public visitBranchedContext ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitCatchList() public méthode

public visitCatchList ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitClass() public méthode

public visitClass ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitClosedContext() public méthode

│ ▼ ┌──●────┐ │ │ ●──●──● │ ┌────┘ ● │ ▼
public visitClosedContext ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitClosure() public méthode

public visitClosure ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitFuncDecl() public méthode

public visitFuncDecl ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitIf() public méthode

public visitIf ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitIfElem() public méthode

public visitIfElem ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitMethod() public méthode

public visitMethod ( ast\Node\Decl $node ) : Context
$node ast\Node\Decl An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node

visitTry() public méthode

public visitTry ( ast\Node $node ) : Context
$node ast\Node An AST node we'd like to determine the UnionType for
Résultat Phan\Language\Context The updated context after visiting the node