Passed
Push — master ( 826970...fb2b49 )
by Michael
02:26
created
src/Request/JsonApiDocumentParameterConverter.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $isOptional = $configuration->isOptional();
75 75
         $isJsonApi  = $request->headers->contains('Content-Type', 'application/vnd.api+json');
76 76
 
77
-        if (! $isOptional && ! $isJsonApi) {
77
+        if (!$isOptional && !$isJsonApi) {
78 78
             throw new BadRequestHttpException(sprintf(
79 79
                 'Invalid media-type of request, "application/vnd.api+json" expected, "%s" given.',
80 80
                 implode(', ', (array) $request->headers->get('Content-Type'))
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 
84 84
         $content = $request->getContent();
85 85
 
86
-        if (! empty($content)) {
86
+        if (!empty($content)) {
87 87
             return $content;
88 88
         }
89 89
 
90
-        if (! $isOptional) {
90
+        if (!$isOptional) {
91 91
             throw new BadRequestHttpException('Request body is empty');
92 92
         }
93 93
     }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
      * Decode JSON
98 98
      *
99 99
      * @param  string $content
100
-     * @return mixed
100
+     * @return \stdClass
101 101
      * @throws BadRequestHttpException
102 102
      */
103 103
     protected function decodeContent(string $content): \stdClass
Please login to merge, or discard this patch.