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