@@ -15,9 +15,9 @@ |
||
| 15 | 15 | $root = $builder->root('jsonrpc_server'); |
| 16 | 16 | |
| 17 | 17 | $root->children() |
| 18 | - ->scalarNode('view_listener') |
|
| 19 | - ->info('View listener service ID') |
|
| 20 | - ->defaultValue('jsonrpc_server.builtin_adapter.view_listener'); |
|
| 18 | + ->scalarNode('view_listener') |
|
| 19 | + ->info('View listener service ID') |
|
| 20 | + ->defaultValue('jsonrpc_server.builtin_adapter.view_listener'); |
|
| 21 | 21 | |
| 22 | 22 | $adapters = $root->children()->arrayNode('adapters'); |
| 23 | 23 | $this->configureJms($adapters); |
@@ -28,15 +28,15 @@ |
||
| 28 | 28 | |
| 29 | 29 | if (!empty($config['view_listener'])) { |
| 30 | 30 | $container->getDefinition($config['view_listener']) |
| 31 | - ->setPublic(true) |
|
| 32 | - ->addTag( |
|
| 33 | - 'kernel.event_listener', |
|
| 34 | - [ |
|
| 35 | - 'event' => RpcEvents::VIEW, |
|
| 36 | - 'method' => 'onPlainResponse', |
|
| 37 | - 'priority' => -254, |
|
| 38 | - ] |
|
| 39 | - ); |
|
| 31 | + ->setPublic(true) |
|
| 32 | + ->addTag( |
|
| 33 | + 'kernel.event_listener', |
|
| 34 | + [ |
|
| 35 | + 'event' => RpcEvents::VIEW, |
|
| 36 | + 'method' => 'onPlainResponse', |
|
| 37 | + 'priority' => -254, |
|
| 38 | + ] |
|
| 39 | + ); |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | '/', |
| 120 | 120 | $content |
| 121 | 121 | ); |
| 122 | - $response = $controller->jsonRpcAction($request); |
|
| 122 | + $response = $controller->jsonRpcAction($request); |
|
| 123 | 123 | |
| 124 | 124 | self::assertTrue($response->isSuccessful()); |
| 125 | 125 | self::assertEquals($responseBody, $response->getContent()); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | 'method' => 'exception', |
| 137 | 137 | ] |
| 138 | 138 | ); |
| 139 | - $response = $controller->jsonRpcAction($request); |
|
| 139 | + $response = $controller->jsonRpcAction($request); |
|
| 140 | 140 | |
| 141 | 141 | self::assertTrue($response->isSuccessful()); |
| 142 | 142 | self::assertEquals( |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | ], |
| 164 | 164 | ] |
| 165 | 165 | ); |
| 166 | - $response = $controller->jsonRpcAction($request); |
|
| 166 | + $response = $controller->jsonRpcAction($request); |
|
| 167 | 167 | |
| 168 | 168 | self::assertTrue($response->isSuccessful()); |
| 169 | 169 | self::assertEquals( |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $kernel = $this->prophesize(KernelInterface::class); |
| 190 | 190 | $resolver = $this->prophesize(ControllerResolverInterface::class); |
| 191 | 191 | $resolver->getController(Argument::type(RpcRequestInterface::class))->willReturn( |
| 192 | - function (JsonRpcRequestInterface $request) { |
|
| 192 | + function(JsonRpcRequestInterface $request) { |
|
| 193 | 193 | if ($request->getMethod() === 'exception') { |
| 194 | 194 | throw new \LogicException('Failure!'); |
| 195 | 195 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | } |
| 199 | 199 | ); |
| 200 | 200 | $resolver->getArguments(Argument::type(RpcRequestInterface::class), Argument::any())->will( |
| 201 | - function (array $args) { |
|
| 201 | + function(array $args) { |
|
| 202 | 202 | return [ |
| 203 | 203 | $args[0], |
| 204 | 204 | ]; |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | $evm = $this->prophesize(EventDispatcherInterface::class); |
| 209 | 209 | $evm->dispatch(Argument::exact(RpcEvents::EXCEPTION), Argument::type(GetExceptionResponseEvent::class)) |
| 210 | 210 | ->will( |
| 211 | - function ($args) { |
|
| 211 | + function($args) { |
|
| 212 | 212 | /** @var GetExceptionResponseEvent $event */ |
| 213 | 213 | $event = $args[1]; |
| 214 | 214 | |