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