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

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

Защищенные свойства (Protected)

Свойство Тип Описание
$nodeSet

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

Метод Описание
analyze ( PDepend\Source\AST\ASTNamespace[] $namespaces ) : void Processes all {@link \PDepend\Source\AST\ASTNamespace} code nodes.
getAfferents ( PDepend\Source\AST\AbstractASTArtifact $node ) : PDepend\Source\AST\AbstractASTArtifact[] Returns an array of all afferent nodes.
getCycle ( PDepend\Source\AST\AbstractASTArtifact $node ) : PDepend\Source\AST\AbstractASTArtifact[] Returns an array of nodes that build a cycle for the requested node or it returns null if no cycle exists .
getEfferents ( PDepend\Source\AST\AbstractASTArtifact $node ) : PDepend\Source\AST\AbstractASTArtifact[] Returns an array of all efferent nodes.
getStats ( PDepend\Source\AST\AbstractASTArtifact $node ) : array Returns the statistics for the requested node.
visitClass ( PDepend\Source\AST\ASTClass $class ) : void Visits a class node.
visitInterface ( PDepend\Source\AST\ASTInterface $interface ) : void Visits an interface node.
visitMethod ( PDepend\Source\AST\ASTMethod $method ) : void Visits a method node.
visitNamespace ( PDepend\Source\AST\ASTNamespace $namespace ) : void Visits a namespace node.

Защищенные методы

Метод Описание
calculateAbstractness ( ) : void Calculates the abstractness for all analyzed nodes.
calculateDistance ( ) : void Calculates the distance to an optimal value.
calculateInstability ( ) : void Calculates the instability for all analyzed nodes.
collectCycle ( array &$list, PDepend\Source\AST\ASTNamespace $namespace ) : boolean Collects a single cycle that is reachable by this namespace. All namespaces that are part of the cylce are stored in the given $list array.
initNamespaceMetric ( PDepend\Source\AST\ASTNamespace $namespace ) : void Initializes the node metric record for the given $namespace.
postProcess ( ) : void Post processes all analyzed nodes.
visitType ( PDepend\Source\AST\AbstractASTClassOrInterface $type ) : void Generic visit method for classes and interfaces. Both visit methods delegate calls to this method.

Приватные методы

Метод Описание
collectDependencies ( PDepend\Source\AST\ASTNamespace $namespaceA, PDepend\Source\AST\ASTNamespace $namespaceB ) : void Collects the dependencies between the two given namespaces.

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

analyze() публичный Метод

Processes all {@link \PDepend\Source\AST\ASTNamespace} code nodes.
public analyze ( PDepend\Source\AST\ASTNamespace[] $namespaces ) : void
$namespaces PDepend\Source\AST\ASTNamespace[]
Результат void

calculateAbstractness() защищенный Метод

Calculates the abstractness for all analyzed nodes.
protected calculateAbstractness ( ) : void
Результат void

calculateDistance() защищенный Метод

Calculates the distance to an optimal value.
protected calculateDistance ( ) : void
Результат void

calculateInstability() защищенный Метод

Calculates the instability for all analyzed nodes.
protected calculateInstability ( ) : void
Результат void

collectCycle() защищенный Метод

Collects a single cycle that is reachable by this namespace. All namespaces that are part of the cylce are stored in the given $list array.
protected collectCycle ( array &$list, PDepend\Source\AST\ASTNamespace $namespace ) : boolean
$list array
$namespace PDepend\Source\AST\ASTNamespace
Результат boolean If this method detects a cycle the return value is true otherwise this method will return false.

getAfferents() публичный Метод

Returns an array of all afferent nodes.
public getAfferents ( PDepend\Source\AST\AbstractASTArtifact $node ) : PDepend\Source\AST\AbstractASTArtifact[]
$node PDepend\Source\AST\AbstractASTArtifact
Результат PDepend\Source\AST\AbstractASTArtifact[]

getCycle() публичный Метод

Returns an array of nodes that build a cycle for the requested node or it returns null if no cycle exists .
public getCycle ( PDepend\Source\AST\AbstractASTArtifact $node ) : PDepend\Source\AST\AbstractASTArtifact[]
$node PDepend\Source\AST\AbstractASTArtifact
Результат PDepend\Source\AST\AbstractASTArtifact[]

getEfferents() публичный Метод

Returns an array of all efferent nodes.
public getEfferents ( PDepend\Source\AST\AbstractASTArtifact $node ) : PDepend\Source\AST\AbstractASTArtifact[]
$node PDepend\Source\AST\AbstractASTArtifact
Результат PDepend\Source\AST\AbstractASTArtifact[]

getStats() публичный Метод

Returns the statistics for the requested node.
public getStats ( PDepend\Source\AST\AbstractASTArtifact $node ) : array
$node PDepend\Source\AST\AbstractASTArtifact
Результат array

initNamespaceMetric() защищенный Метод

Initializes the node metric record for the given $namespace.
protected initNamespaceMetric ( PDepend\Source\AST\ASTNamespace $namespace ) : void
$namespace PDepend\Source\AST\ASTNamespace
Результат void

postProcess() защищенный Метод

Post processes all analyzed nodes.
protected postProcess ( ) : void
Результат void

visitClass() публичный Метод

Visits a class node.
public visitClass ( PDepend\Source\AST\ASTClass $class ) : void
$class PDepend\Source\AST\ASTClass
Результат void

visitInterface() публичный Метод

Visits an interface node.
public visitInterface ( PDepend\Source\AST\ASTInterface $interface ) : void
$interface PDepend\Source\AST\ASTInterface
Результат void

visitMethod() публичный Метод

Visits a method node.
public visitMethod ( PDepend\Source\AST\ASTMethod $method ) : void
$method PDepend\Source\AST\ASTMethod
Результат void

visitNamespace() публичный Метод

Visits a namespace node.
public visitNamespace ( PDepend\Source\AST\ASTNamespace $namespace ) : void
$namespace PDepend\Source\AST\ASTNamespace
Результат void

visitType() защищенный Метод

Generic visit method for classes and interfaces. Both visit methods delegate calls to this method.
protected visitType ( PDepend\Source\AST\AbstractASTClassOrInterface $type ) : void
$type PDepend\Source\AST\AbstractASTClassOrInterface
Результат void

Описание свойств

$nodeSet защищенное свойство

protected $nodeSet