Passed
Push — master ( 4d9ea0...ff80d7 )
by Anton
02:10
created
src/Http/Middleware/JsonPayloadMiddleware.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@
 block discarded – undo
27 27
      */
28 28
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
29 29
     {
30
-        if ($this->isJsonPayload($request)) {
30
+        if ($this->isJsonPayload($request)){
31 31
             $request = $request->withParsedBody(json_decode($request->getBody()->getContents(), true));
32
-            if (json_last_error() !== 0) {
32
+            if (json_last_error() !== 0){
33 33
                 throw new ClientException(400, 'invalid json payload');
34 34
             }
35 35
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,9 +27,11 @@
 block discarded – undo
27 27
      */
28 28
     public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
29 29
     {
30
-        if ($this->isJsonPayload($request)) {
30
+        if ($this->isJsonPayload($request))
31
+        {
31 32
             $request = $request->withParsedBody(json_decode($request->getBody()->getContents(), true));
32
-            if (json_last_error() !== 0) {
33
+            if (json_last_error() !== 0)
34
+            {
33 35
                 throw new ClientException(400, 'invalid json payload');
34 36
             }
35 37
         }
Please login to merge, or discard this patch.