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