Method | 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 ( |
Take a look at all globally accessible elements and see if we can find any dead code that is never referenced | |
analyzeFile ( |
Once we know what the universe looks like we can scan for more complicated issues. | |
analyzeFile ( CodeBase $code_base, string $file_path ) : |
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 ( |
Take a pass over all functions verifying various states. | |
parseFile ( |
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 ) : |
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, |
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 ( |
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. |
public static analyzeClasses ( $code_base ) : void | ||
return | void |
public static analyzeDeadCode ( CodeBase $code_base ) : void | ||
$code_base | CodeBase | |
return | void |
public static analyzeDeadCode ( |
||
$code_base | ||
return | void |
public static analyzeFile ( |
||
$code_base | The global code base holding all state | |
$file_path | string | A list of files to scan |
return |
public static analyzeFile ( CodeBase $code_base, string $file_path ) : |
||
$code_base | CodeBase | The global code base holding all state |
$file_path | string | A list of files to scan |
return |
public static analyzeFunctions ( CodeBase $code_base ) : null | ||
$code_base | CodeBase | |
return | null |
public static analyzeFunctions ( |
||
$code_base | ||
return | null |
public static parseFile ( |
||
$code_base | 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 |
return |
public static parseFile ( CodeBase $code_base, string $file_path ) : |
||
$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 |
return |
public static parseNodeInContext ( CodeBase $code_base, |
||
$code_base | CodeBase | The global code base in which we store all state |
$context | The context in which this node exists | |
$node | ast\Node | A node to parse and scan for errors |
return | The context from within the node is returned |
public static parseNodeInContext ( |
||
$code_base | The global code base in which we store all state | |
$context | The context in which this node exists | |
$node | ast\Node | A node to parse and scan for errors |
return | The context from within the node is returned |
public static shouldVisit ( ast\Node $node ) : boolean | ||
$node | ast\Node | A node we'd like to determine if we should visit |
return | boolean | True if the given node should be visited or false if it should be skipped entirely |