PHP Класс Phan\Analysis

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

analyzeClasses() публичный статический Метод

Take a pass over all classes/traits/interfaces verifying various states.
public static analyzeClasses ( $code_base ) : void
Результат void

analyzeDeadCode() публичный статический Метод

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
Результат void

analyzeDeadCode() публичный статический Метод

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
Результат void

analyzeFile() публичный статический Метод

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
Результат Phan\Language\Context

analyzeFile() публичный статический Метод

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
Результат Phan\Language\Context

analyzeFunctions() публичный статический Метод

Take a pass over all functions verifying various states.
public static analyzeFunctions ( CodeBase $code_base ) : null
$code_base CodeBase
Результат null

analyzeFunctions() публичный статический Метод

Take a pass over all functions verifying various states.
public static analyzeFunctions ( CodeBase $code_base ) : null
$code_base CodeBase
Результат null

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.
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
Результат Phan\Language\Context

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.
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
Результат Phan\Language\Context

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.
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
Результат Phan\Language\Context The context from within the node is returned

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.
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
Результат Phan\Language\Context The context from within the node is returned

shouldVisit() публичный статический Метод

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
Результат boolean True if the given node should be visited or false if it should be skipped entirely