| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2.0014 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 1 | public function process(ContainerBuilder $container) |
|
| 15 | { |
||
| 16 | 1 | if (!$container->has('jms_serializer')) { |
|
| 17 | return; |
||
| 18 | } |
||
| 19 | |||
| 20 | 1 | $definition = $container->register('jsonrpc.view.serialize_response', SerializedJsonRpcResponseListener::class); |
|
| 21 | 1 | $definition->setArguments( |
|
| 22 | [ |
||
| 23 | 1 | new Reference('jms_serializer'), |
|
| 24 | ] |
||
| 25 | 1 | ); |
|
| 26 | 1 | $definition->addTag( |
|
| 27 | 1 | 'kernel.event_listener', |
|
| 28 | [ |
||
| 29 | 1 | 'event' => RpcEvents::VIEW, |
|
| 30 | 1 | 'method' => 'onPlainResponse', |
|
| 31 | 1 | 'priority' => -254, |
|
| 32 | ] |
||
| 33 | 1 | ); |
|
| 34 | 1 | } |
|
| 35 | } |
||
| 36 |