Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function normalize($object, $format = null, array $context = []) |
||
28 | { |
||
29 | if (is_array($object)) { |
||
30 | $result = []; |
||
31 | foreach ($object as $key => $value) { |
||
32 | $result[$key] = $this->normalize($value, $format, $context); |
||
33 | } |
||
34 | |||
35 | return $result; |
||
36 | } |
||
37 | |||
38 | if ($object instanceof MatcherStub) { |
||
39 | return [ |
||
40 | 'data' => $object->getData(), |
||
41 | ]; |
||
42 | } |
||
43 | |||
44 | return $object; |
||
|
|||
45 | } |
||
46 | |||
52 |