| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | 2 | public function rollHand(int $numDice): diceHand |
|
| 39 | { |
||
| 40 | // Skapar tärningshand |
||
| 41 | 2 | $hand = new DiceHand(); |
|
| 42 | 2 | for ($i = 1; $i <= $numDice; $i++) { |
|
| 43 | //Lägger antal tärningar i handen |
||
| 44 | 2 | $hand->add(new DiceGraphic()); |
|
| 45 | } |
||
| 46 | // Rullar tärningen |
||
| 47 | 2 | $hand->roll(); |
|
| 48 | |||
| 49 | 2 | return $hand; |
|
| 50 | } |
||
| 87 |