protected calculateComplexity ( PDepend\Source\AST\AbstractASTCallable $callable ) : void | ||
$callable | PDepend\Source\AST\AbstractASTCallable | |
return | void |
protected function calculateComplexity(AbstractASTCallable $callable)
{
$npath = '1';
foreach ($callable->getChildren() as $child) {
$stmt = $child->accept($this, $npath);
$npath = MathUtil::mul($npath, $stmt);
}
$this->metrics[$callable->getId()] = $npath;
}