Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
35 | 3 | public function normalize($topic, $format = null, array $context = []) |
|
36 | { |
||
37 | 3 | $serializer = new Serializer([ |
|
38 | 3 | new JsonSerializableNormalizer($this->objectNormalizer), |
|
39 | 3 | $this->objectNormalizer, |
|
40 | ]); |
||
41 | |||
42 | 3 | $topic->options = \json_encode($topic->options); |
|
43 | |||
44 | 3 | return $serializer->normalize($topic, null, ['skip_null_values' => true]); |
|
45 | } |
||
56 |