Conditions | 8 |
Paths | 16 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 8.048 |
Changes | 0 |
1 | <?php |
||
22 | 2 | public function load(array $groups = [], array $excludeGroups = [], array $options = []): void |
|
23 | { |
||
24 | 2 | $fixtures = $this->loader->getFixtures($groups, $excludeGroups); |
|
25 | 2 | $wantedProcessor = isset($options['processor']) ? $options['processor'] : null; |
|
26 | |||
27 | 2 | foreach ($fixtures as $fixture) { |
|
28 | // Ignore this fixture if it doesn't depends on the wanted processor. |
||
29 | 2 | if (null !== $wantedProcessor && $wantedProcessor !== $fixture->getProcessor()) { |
|
30 | continue; |
||
31 | } |
||
32 | |||
33 | 2 | $processorOptions = isset($options[$fixture->getProcessor()]) ? $options[$fixture->getProcessor()] : []; |
|
34 | |||
35 | 2 | $this->getProcessor($fixture->getProcessor())->process($fixture, $processorOptions); |
|
36 | } |
||
37 | |||
38 | 2 | foreach ($this->processors as $processor) { |
|
39 | 2 | $processor->flush($options[$fixture->getProcessor()] ?: []); |
|
|
|||
40 | } |
||
41 | 2 | } |
|
42 | |||
52 |
It seems like you are relying on a variable being defined by an iteration: