PHP Класс PDepend\Metrics\Analyzer\CrapIndexAnalyzer

Наследование: extends PDepend\Metrics\AbstractAnalyzer, implements PDepend\Metrics\AggregateAnalyzer, implements PDepend\Metrics\AnalyzerNodeAware
Показать файл Открыть проект Примеры использования класса

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

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