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