Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
45 | public function normalizeField( |
||
46 | string $path, |
||
47 | $object, |
||
48 | NormalizerContextInterface $context, |
||
49 | NormalizerInterface $normalizer = null |
||
50 | ) { |
||
51 | if (null === $childObjects = $this->accessor->getValue($object)) { |
||
52 | return null; |
||
53 | } |
||
54 | |||
55 | $values = []; |
||
56 | foreach ($childObjects as $i => $childObject) { |
||
57 | $values[$i] = $this->childAccessor->getValue($childObject); |
||
58 | } |
||
59 | |||
60 | return $values; |
||
61 | } |
||
62 | } |
||
63 |