PDepend\Metrics\Analyzer\DependencyAnalyzer::visitType PHP 메소드

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
    protected function visitType(AbstractASTClassOrInterface $type)
    {
        $id = $type->getNamespace()->getId();
        // Increment total classes count
        ++$this->nodeMetrics[$id][self::M_NUMBER_OF_CLASSES];
        // Check for abstract or concrete class
        if ($type->isAbstract()) {
            ++$this->nodeMetrics[$id][self::M_NUMBER_OF_ABSTRACT_CLASSES];
        } else {
            ++$this->nodeMetrics[$id][self::M_NUMBER_OF_CONCRETE_CLASSES];
        }
        foreach ($type->getDependencies() as $dependency) {
            $this->collectDependencies($type->getNamespace(), $dependency->getNamespace());
        }
        foreach ($type->getMethods() as $method) {
            $method->accept($this);
        }
    }