Conditions | 9 |
Paths | 6 |
Total Lines | 20 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 9 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 1 | public function getMaxAllowableHoleScore($par, $courseHandicap) |
|
27 | { |
||
28 | switch(true) { |
||
29 | 1 | case ($courseHandicap <= 9): |
|
30 | 1 | $maxScore = $par + 2; |
|
31 | 1 | break; |
|
32 | 1 | case (($courseHandicap > 9) && ($courseHandicap < 20)): //10-19 |
|
33 | 1 | $maxScore = 7; |
|
34 | 1 | break; |
|
35 | 1 | case (($courseHandicap >= 20) && ($courseHandicap < 30))://20-29 |
|
36 | 1 | $maxScore = 8; |
|
37 | 1 | break; |
|
38 | 1 | case (($courseHandicap >= 30) && ($courseHandicap < 40))://30-39 |
|
39 | 1 | $maxScore = 9; |
|
40 | 1 | break; |
|
41 | 1 | case ($courseHandicap >= 40): |
|
42 | 1 | $maxScore = 10; |
|
43 | } |
||
44 | 1 | return $maxScore; |
|
45 | } |
||
46 | } |
||
47 |
This check marks private properties in classes that are never used. Those properties can be removed.