| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function buildDice(string $type, int $number): array |
||
| 36 | { |
||
| 37 | foreach ($this->factories as $factory) { |
||
| 38 | if ($factory->handlesType($type)) { |
||
| 39 | return $factory->buildDice($type, $number); |
||
| 40 | } |
||
| 41 | } |
||
| 42 | throw new UncreatableDiceException("No idea how to make a d{$type}"); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |