Passed
Push — master ( 3731bd...1982f3 )
by Anton
02:49 queued 18s
created
src/Http/Middleware/JsonPayloadMiddleware.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,9 +29,11 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.