Conditions | 3 |
Paths | 3 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 3.1406 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 1 | public function getGenerator(string $id): GeneratorInterface |
|
28 | { |
||
29 | 1 | if (!isset($this->generators[$id])) { |
|
30 | 1 | throw new GeneratorNotFoundException('Generator "' . $id . '" not found'); |
|
31 | } |
||
32 | |||
33 | return $this->generators[$id] instanceof Closure ? $this->generators[$id]() : $this->generators[$id]; |
||
34 | } |
||
44 |