| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 6 | public function normalize($entity, array $context = []) |
|
| 32 | { |
||
| 33 | 6 | if (null === $entity) { |
|
| 34 | return null; |
||
| 35 | } |
||
| 36 | |||
| 37 | 6 | $jmsContext = $this->contextFactory->createSerializationContext(); |
|
| 38 | 6 | $jmsContext->setGroups($context); |
|
| 39 | |||
| 40 | 6 | return $this->normalizer->toArray($entity, $jmsContext); |
|
| 41 | } |
||
| 42 | } |
||
| 43 |