Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
27 | 1 | private function buildTreeStep(ContainerBuilder $container, array $steps) |
|
28 | { |
||
29 | 1 | foreach ($steps as $stepId => $step) { |
|
30 | 1 | $isStepIterable = in_array( |
|
31 | 1 | IterableStepInterface::class, |
|
32 | 1 | class_implements($container->findDefinition($step['service'])->getClass()) |
|
33 | ); |
||
34 | |||
35 | 1 | if ($isStepIterable) { |
|
36 | 1 | $children = array_splice($steps, $stepId + 1); |
|
37 | |||
38 | 1 | $steps[$stepId]['children'] = $this->buildTreeStep($container, $children); |
|
39 | |||
40 | 1 | return $steps; |
|
41 | } |
||
42 | } |
||
43 | |||
44 | 1 | return $steps; |
|
45 | } |
||
47 |