| Conditions | 2 |
| Paths | 2 |
| Total Lines | 29 |
| Code Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function regenerateClasses(): void |
||
| 30 | { |
||
| 31 | $data = [ |
||
| 32 | 2 | Packages::class, |
|
| 33 | Types::class, |
||
| 34 | Directories::class, |
||
| 35 | 2 | Versions::class, |
|
| 36 | Dependencies::class, |
||
| 37 | ]; |
||
| 38 | |||
| 39 | foreach ($data as $class) { |
||
| 40 | $reflection = new ReflectionClass($class); |
||
| 41 | |||
| 42 | 2 | $template = sprintf( |
|
| 43 | 2 | '%s.twig', |
|
| 44 | strtolower($reflection->getShortName()) |
||
| 45 | 2 | ); |
|
| 46 | 2 | ||
| 47 | 2 | $installPath = sprintf( |
|
| 48 | '%s/../build/%s.php', |
||
| 49 | __DIR__, |
||
| 50 | 2 | $reflection->getShortName() |
|
| 51 | 2 | ); |
|
| 52 | 2 | ||
| 53 | 2 | /** @var ExporterInterface $exporter */ |
|
| 54 | $exporter = $reflection->newInstance($this->event); |
||
| 55 | |||
| 56 | $exporter |
||
| 57 | 2 | ->exportToFile($template, $installPath); |
|
| 58 | } |
||
| 61 |