/** * Checks if a part of code is complex * * @param Node $node * @return bool */ protected function isComplex(Node $node) { $complexity = $this->complexityComputer->compute($node); return $complexity > $this->getThreshold(); }
/** * Calculates Cylomatic Complexity Number. * * @param Node $node * @return int */ protected static function calculateCCN(Node $node) { return static::$complexityComputer->compute($node); }