Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function dump($value) |
||
25 | { |
||
26 | uasort($this->children, function (ChildDumperInterface $child, ChildDumperInterface $child2) { |
||
27 | return $child->getSequence() > $child2->getSequence(); |
||
28 | }); |
||
29 | |||
30 | $dataAccessor = $this->dataAccessorFactory->createByData($value); |
||
31 | foreach ($this->children as $key => $child) { |
||
32 | $childResult = $dataAccessor->get($key); |
||
33 | if (null === $childResult) { |
||
34 | continue; |
||
35 | } |
||
36 | |||
37 | $child->isRepeatable() ? array_walk($childResult, function ($val) use ($child) { |
||
38 | $child->dump($val); |
||
39 | }) : $child->dump($childResult); |
||
40 | } |
||
41 | } |
||
42 | } |
||
43 |