PHP 클래스 Phan\Analysis

파일 보기 프로젝트 열기: etsy/phan 1 사용 예제들

공개 메소드들

메소드 설명
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