| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function seedFixtures(EntityManagerInterface $em, array $config): void |
||
| 30 | { |
||
| 31 | $paths = $config['paths'] ?? []; |
||
| 32 | if (empty($paths)) { |
||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | $loader = new Loader(); |
||
| 37 | foreach ($paths as $path) { |
||
| 38 | $loader->loadFromDirectory($path); |
||
| 39 | } |
||
| 40 | |||
| 41 | $executor = new ORMExecutor($em); |
||
| 42 | $executor->execute($loader->getFixtures(), true); |
||
| 43 | } |
||
| 45 |