Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 1 | public function adjustScores(array $holeScores, $courseHandicap) |
|
23 | { |
||
24 | 1 | foreach($holeScores as $key => $holeScore){ |
|
25 | 1 | $maxHoleScore = $this->getMaxAllowableHoleScore($holeScore['par'],$courseHandicap); |
|
26 | |||
27 | 1 | if($holeScore['score'] >= $maxHoleScore ){ |
|
28 | 1 | $this->escResultArray[] = $maxHoleScore; |
|
29 | } else { |
||
30 | 1 | $this->escResultArray[] = $holeScore['score']; |
|
31 | } |
||
32 | } |
||
33 | |||
34 | 1 | return $this->escResultArray; |
|
35 | } |
||
36 | |||
66 |