Conditions | 5 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 5.0488 |
Changes | 0 |
1 | <?php |
||
18 | 34 | public function isComplete() : bool |
|
19 | { |
||
20 | 34 | if (empty($this->roll_array)) { |
|
21 | return false; |
||
22 | } |
||
23 | |||
24 | 34 | if (self::MAX_ROLLS_BY_FRAME == count($this->roll_array)) { |
|
25 | 32 | return true; |
|
26 | } |
||
27 | |||
28 | 34 | if ($this->roll_array[0]->type()->isSpare() || $this->roll_array[0]->type()->isStrike()) { |
|
29 | 14 | return true; |
|
30 | } |
||
31 | |||
32 | 32 | return false; |
|
33 | } |
||
34 | } |
||
35 |