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