PHP Class PDepend\Metrics\Analyzer\CrapIndexAnalyzer

Inheritance: extends PDepend\Metrics\AbstractAnalyzer, implements PDepend\Metrics\AggregateAnalyzer, implements PDepend\Metrics\AnalyzerNodeAware
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

addAnalyzer() public méthode

Adds an analyzer that this analyzer depends on.
public addAnalyzer ( PDepend\Metrics\Analyzer $analyzer ) : void
$analyzer PDepend\Metrics\Analyzer
Résultat void

analyze() public méthode

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

getNodeMetrics() public méthode

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
Résultat array(string=>float)

getRequiredAnalyzers() public méthode

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

isEnabled() public méthode

Returns true when this analyzer is enabled.
public isEnabled ( ) : boolean
Résultat boolean

visitFunction() public méthode

Visits the given function.
public visitFunction ( PDepend\Source\AST\ASTFunction $function ) : void
$function PDepend\Source\AST\ASTFunction
Résultat void

visitMethod() public méthode

Visits the given method.
public visitMethod ( PDepend\Source\AST\ASTMethod $method ) : void
$method PDepend\Source\AST\ASTMethod
Résultat void