| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | protected function generate(string $class, callable $generator): array |
||
| 36 | { |
||
| 37 | $compiler = new Compiler(new Builder()); |
||
| 38 | $compiler->setClassName($class); |
||
| 39 | |||
| 40 | $code = $generator(...[&$compiler]) ?: $compiler->compile(); |
||
| 41 | |||
| 42 | return [ |
||
| 43 | "<?php\n$code", |
||
| 44 | \serialize($compiler->exportDependencies()), |
||
| 45 | ]; |
||
| 48 |