/** * @inheritdoc */ public function calculate(ResultCollection $collection, ResultCollection $groupedResults, ResultInterface $bound) { return round($this->calculator->highIsBetter(108, 60, $bound->getAverage('maintainabilityIndex')), 2); }
/** * @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); }
/** * @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); }