PHP 클래스 PDepend\Metrics\Analyzer\CrapIndexAnalyzer

상속: extends PDepend\Metrics\AbstractAnalyzer, implements PDepend\Metrics\AggregateAnalyzer, implements PDepend\Metrics\AnalyzerNodeAware
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

공개 메소드들

메소드 설명
addAnalyzer ( PDepend\Metrics\Analyzer $analyzer ) : void Adds an analyzer that this analyzer depends on.
analyze ( PDepend\Source\AST\ASTNamespace[] $namespaces ) : void Performs the crap index analysis.
getNodeMetrics ( PDepend\Source\AST\ASTArtifact $artifact ) : array(string=>float) Returns the calculated metrics for the given node or an empty array when no metrics exist for the given node.
getRequiredAnalyzers ( ) : array(string) Returns an array with analyzer class names that are required by the crap index analyzers.
isEnabled ( ) : boolean Returns true when this analyzer is enabled.
visitFunction ( PDepend\Source\AST\ASTFunction $function ) : void Visits the given function.
visitMethod ( PDepend\Source\AST\ASTMethod $method ) : void Visits the given method.

비공개 메소드들

메소드 설명
calculateCoverage ( PDepend\Source\AST\AbstractASTCallable $callable ) : float Calculates the code coverage for the given callable object.
calculateCrapIndex ( PDepend\Source\AST\AbstractASTCallable $callable ) : float Calculates the crap index for the given callable.
createCoverageReport ( ) : PDepend\Util\Coverage\Report Creates a new coverage report instance.
createOrReturnCoverageReport ( ) : PDepend\Util\Coverage\Report Returns a previously created report instance or creates a new report instance.
doAnalyze ( PDepend\Source\AST\ASTNamespace[] $namespaces ) : void Performs the crap index analysis.
visitCallable ( PDepend\Source\AST\AbstractASTCallable $callable ) : void Visits the given callable instance.

메소드 상세

addAnalyzer() 공개 메소드

Adds an analyzer that this analyzer depends on.
public addAnalyzer ( PDepend\Metrics\Analyzer $analyzer ) : void
$analyzer PDepend\Metrics\Analyzer
리턴 void

analyze() 공개 메소드

Performs the crap index analysis.
public analyze ( PDepend\Source\AST\ASTNamespace[] $namespaces ) : void
$namespaces PDepend\Source\AST\ASTNamespace[]
리턴 void

getNodeMetrics() 공개 메소드

Returns the calculated metrics for the given node or an empty array when no metrics exist for the given node.
public getNodeMetrics ( PDepend\Source\AST\ASTArtifact $artifact ) : array(string=>float)
$artifact PDepend\Source\AST\ASTArtifact
리턴 array(string=>float)

getRequiredAnalyzers() 공개 메소드

Returns an array with analyzer class names that are required by the crap index analyzers.
public getRequiredAnalyzers ( ) : array(string)
리턴 array(string)

isEnabled() 공개 메소드

Returns true when this analyzer is enabled.
public isEnabled ( ) : boolean
리턴 boolean

visitFunction() 공개 메소드

Visits the given function.
public visitFunction ( PDepend\Source\AST\ASTFunction $function ) : void
$function PDepend\Source\AST\ASTFunction
리턴 void

visitMethod() 공개 메소드

Visits the given method.
public visitMethod ( PDepend\Source\AST\ASTMethod $method ) : void
$method PDepend\Source\AST\ASTMethod
리턴 void