/**
  * 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();
 }
Exemplo n.º 2
0
 /**
  * Calculates Cylomatic Complexity Number.
  *
  * @param Node $node
  * @return int
  */
 protected static function calculateCCN(Node $node)
 {
     return static::$complexityComputer->compute($node);
 }