PHP Class Phan\Analysis

Afficher le fichier Open project: etsy/phan Class Usage Examples

Méthodes publiques

Méthode Description
analyzeClasses ( $code_base ) : void Take a pass over all classes/traits/interfaces verifying various states.
analyzeDeadCode ( CodeBase $code_base ) : void Take a look at all globally accessible elements and see if we can find any dead code that is never referenced
analyzeDeadCode ( CodeBase $code_base ) : void Take a look at all globally accessible elements and see if we can find any dead code that is never referenced
analyzeFile ( CodeBase $code_base, string $file_path ) : Context Once we know what the universe looks like we can scan for more complicated issues.
analyzeFile ( CodeBase $code_base, string $file_path ) : Context Once we know what the universe looks like we can scan for more complicated issues.
analyzeFunctions ( CodeBase $code_base ) : null Take a pass over all functions verifying various states.
analyzeFunctions ( CodeBase $code_base ) : null Take a pass over all functions verifying various states.
parseFile ( CodeBase $code_base, string $file_path ) : Context This first pass parses code and looks for the subset of issues that can be found without having to have an understanding of the entire code base.
parseFile ( CodeBase $code_base, string $file_path ) : Context This first pass parses code and looks for the subset of issues that can be found without having to have an understanding of the entire code base.
parseNodeInContext ( CodeBase $code_base, Context $context, ast\Node $node ) : Context Parse the given node in the given context populating the code base within the context as a side effect. The returned context is the new context from within the given node.
parseNodeInContext ( CodeBase $code_base, Context $context, ast\Node $node ) : Context Parse the given node in the given context populating the code base within the context as a side effect. The returned context is the new context from within the given node.
shouldVisit ( ast\Node $node ) : boolean Possible Premature Optimization. We can trim a bunch of calls to nodes that we'll never analyze during parsing, pre-order analysis or post-order analysis.

Method Details

analyzeClasses() public static méthode

Take a pass over all classes/traits/interfaces verifying various states.
public static analyzeClasses ( $code_base ) : void
Résultat void

analyzeDeadCode() public static méthode

Take a look at all globally accessible elements and see if we can find any dead code that is never referenced
public static analyzeDeadCode ( CodeBase $code_base ) : void
$code_base CodeBase
Résultat void

analyzeDeadCode() public static méthode

Take a look at all globally accessible elements and see if we can find any dead code that is never referenced
public static analyzeDeadCode ( CodeBase $code_base ) : void
$code_base CodeBase
Résultat void

analyzeFile() public static méthode

Once we know what the universe looks like we can scan for more complicated issues.
public static analyzeFile ( CodeBase $code_base, string $file_path ) : Context
$code_base CodeBase The global code base holding all state
$file_path string A list of files to scan
Résultat Phan\Language\Context

analyzeFile() public static méthode

Once we know what the universe looks like we can scan for more complicated issues.
public static analyzeFile ( CodeBase $code_base, string $file_path ) : Context
$code_base CodeBase The global code base holding all state
$file_path string A list of files to scan
Résultat Phan\Language\Context

analyzeFunctions() public static méthode

Take a pass over all functions verifying various states.
public static analyzeFunctions ( CodeBase $code_base ) : null
$code_base CodeBase
Résultat null

analyzeFunctions() public static méthode

Take a pass over all functions verifying various states.
public static analyzeFunctions ( CodeBase $code_base ) : null
$code_base CodeBase
Résultat null

parseFile() public static méthode

This first pass parses code and looks for the subset of issues that can be found without having to have an understanding of the entire code base.
public static parseFile ( CodeBase $code_base, string $file_path ) : Context
$code_base CodeBase The CodeBase represents state across the entire code base. This is a mutable object which is populated as we parse files
$file_path string The full path to a file we'd like to parse
Résultat Phan\Language\Context

parseFile() public static méthode

This first pass parses code and looks for the subset of issues that can be found without having to have an understanding of the entire code base.
public static parseFile ( CodeBase $code_base, string $file_path ) : Context
$code_base CodeBase The CodeBase represents state across the entire code base. This is a mutable object which is populated as we parse files
$file_path string The full path to a file we'd like to parse
Résultat Phan\Language\Context

parseNodeInContext() public static méthode

Parse the given node in the given context populating the code base within the context as a side effect. The returned context is the new context from within the given node.
public static parseNodeInContext ( CodeBase $code_base, Context $context, ast\Node $node ) : Context
$code_base CodeBase The global code base in which we store all state
$context Phan\Language\Context The context in which this node exists
$node ast\Node A node to parse and scan for errors
Résultat Phan\Language\Context The context from within the node is returned

parseNodeInContext() public static méthode

Parse the given node in the given context populating the code base within the context as a side effect. The returned context is the new context from within the given node.
public static parseNodeInContext ( CodeBase $code_base, Context $context, ast\Node $node ) : Context
$code_base CodeBase The global code base in which we store all state
$context Phan\Language\Context The context in which this node exists
$node ast\Node A node to parse and scan for errors
Résultat Phan\Language\Context The context from within the node is returned

shouldVisit() public static méthode

Possible Premature Optimization. We can trim a bunch of calls to nodes that we'll never analyze during parsing, pre-order analysis or post-order analysis.
public static shouldVisit ( ast\Node $node ) : boolean
$node ast\Node A node we'd like to determine if we should visit
Résultat boolean True if the given node should be visited or false if it should be skipped entirely