Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 2 | public function rollMixedHand(int $num): diceHand |
|
19 | { |
||
20 | 2 | $hand = new DiceHand(); |
|
21 | 2 | for ($i = 1; $i <= $num; $i++) { |
|
22 | 2 | if ($i % 2 === 1) { |
|
23 | 2 | $hand->add(new DiceGraphic()); |
|
24 | 2 | continue; |
|
25 | } |
||
26 | 2 | $hand->add(new Dice()); |
|
27 | } |
||
28 | |||
29 | 2 | $hand->roll(); |
|
30 | |||
31 | 2 | return $hand; |
|
32 | } |
||
87 |