Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | private function getDiceForPart($part) |
||
23 | { |
||
24 | $newDice = []; |
||
25 | $data = $this->parseDiceString($part); |
||
26 | if ((strlen($data["size"]) > 4) || ($data["size"] > 9000)) { |
||
27 | throw new UncreatableDiceException("Only dice with a power level less than 9000 can be created."); |
||
28 | } |
||
29 | for ($i = 0; $i < $data["count"]; $i++) { |
||
30 | $newDice[] = $this->newDiceOfSize($data["size"]); |
||
31 | } |
||
32 | return $newDice; |
||
33 | } |
||
34 | |||
78 |