Passed
Push — master ( 68568e...bce461 )
by Michael
02:41
created
src/Request/JsonApiDocumentParameterConverter.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,17 +73,17 @@
 block discarded – undo
73 73
         $isOptional = $configuration->isOptional();
74 74
         $isJsonApi  = $this->isContentTypeValid($request);
75 75
 
76
-        if (! $isOptional && ! $isJsonApi) {
76
+        if (!$isOptional && !$isJsonApi) {
77 77
             throw new InvalidMediaTypeException($request);
78 78
         }
79 79
 
80 80
         $content = $request->getContent();
81 81
 
82
-        if (! empty($content)) {
82
+        if (!empty($content)) {
83 83
             return $content;
84 84
         }
85 85
 
86
-        if (! $isOptional) {
86
+        if (!$isOptional) {
87 87
             throw new BadRequestHttpException('Request body is empty');
88 88
         }
89 89
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
 
102 102
         try {
103 103
             $document = $this->hydrator->hydrate($decoded);
104
-        }
105
-        catch (InvalidDocumentException $exception) {
104
+        } catch (InvalidDocumentException $exception) {
106 105
             throw new BadRequestHttpException('Document hydration error: ' . $exception->getMessage(), $exception);
107 106
         }
108 107
 
Please login to merge, or discard this patch.