@@ -29,9 +29,9 @@ |
||
29 | 29 | */ |
30 | 30 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
31 | 31 | { |
32 | - if ($this->isJsonPayload($request)) { |
|
32 | + if ($this->isJsonPayload($request)){ |
|
33 | 33 | $request = $request->withParsedBody(json_decode((string)$request->getBody(), true)); |
34 | - if (json_last_error() !== 0) { |
|
34 | + if (json_last_error() !== 0){ |
|
35 | 35 | throw new ClientException(400, 'invalid json payload'); |
36 | 36 | } |
37 | 37 | } |
@@ -29,9 +29,11 @@ |
||
29 | 29 | */ |
30 | 30 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
31 | 31 | { |
32 | - if ($this->isJsonPayload($request)) { |
|
32 | + if ($this->isJsonPayload($request)) |
|
33 | + { |
|
33 | 34 | $request = $request->withParsedBody(json_decode((string)$request->getBody(), true)); |
34 | - if (json_last_error() !== 0) { |
|
35 | + if (json_last_error() !== 0) |
|
36 | + { |
|
35 | 37 | throw new ClientException(400, 'invalid json payload'); |
36 | 38 | } |
37 | 39 | } |