Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | final class Generator extends BaseGenerator |
||
15 | { |
||
16 | /** |
||
17 | * Instantiate the class. |
||
18 | * |
||
19 | * @param class-string<\UnitEnum> $namespace |
||
|
|||
20 | * @param string[] $cases |
||
21 | */ |
||
22 | 4 | public function __construct(string $namespace, array $cases, private readonly Backed $backed) |
|
23 | { |
||
24 | 4 | $this->enum = new GeneratingEnum($namespace, $backed->back($cases)); |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * Retrieve the path of the stub. |
||
29 | */ |
||
30 | 4 | protected function stub(): string |
|
35 | } |
||
36 | } |
||
37 |