Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function calculate(ResultCollection $collection, ResultCollection $groupedResults, ResultInterface $bound)
 {
     $notes = array($this->calculator->lowIsBetter(65, 154, $bound->getAverage('loc')), $this->calculator->highIsBetter(9, 30, $bound->getAverage('logicalLoc')), $this->calculator->highIsBetter(27, 59, $bound->getAverage('vocabulary')));
     return round(array_sum($notes) / count($notes, COUNT_NORMAL), 2);
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function calculate(ResultCollection $collection, ResultCollection $groupedResults, ResultInterface $bound)
 {
     return round($this->calculator->highIsBetter(108, 60, $bound->getAverage('maintainabilityIndex')), 2);
 }
Exemplo n.º 3
0
 /**
  * @inheritdoc
  */
 public function calculate(ResultCollection $collection, ResultCollection $groupedResults, ResultInterface $bound)
 {
     return round($this->calculator->lowIsBetter(1, 8, $bound->getAverage('cyclomaticComplexity')), 2);
 }
Exemplo n.º 4
0
 /**
  * @inheritdoc
  */
 public function calculate(ResultCollection $collection, ResultCollection $groupedResults, ResultInterface $bound)
 {
     $notes = array($this->calculator->lowIsBetter(5.8, 18, $bound->getAverage('difficulty')), $this->calculator->highIsBetter(42, 32, $bound->getAverage('commentWeight')));
     return round(array_sum($notes) / count($notes, COUNT_NORMAL), 2);
 }
Exemplo n.º 5
0
 /**
  * @inheritdoc
  */
 public function calculate(ResultCollection $collection, ResultCollection $groupedResults, ResultInterface $bound)
 {
     return round($this->calculator->lowIsBetter(0.09, 0.7, $bound->getAverage('bugs')), 2);
 }