Passed
Push — master ( d6fdae...fe741a )
by Michael
02:29
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.
src/EventListener/JsonApiViewListener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      *
32 32
      * @var ObjectHandlerInterface[]
33 33
      */
34
-    protected $objectHandlers = [];
34
+    protected $objectHandlers = [ ];
35 35
 
36 36
     /**
37 37
      * Add object-handler
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         foreach ($handler->supports() as $class)
44 44
         {
45
-            $this->objectHandlers[$class] = $handler;
45
+            $this->objectHandlers[ $class ] = $handler;
46 46
         }
47 47
     }
48 48
 
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
     {
175 175
         $class = get_class($object);
176 176
         
177
-        if (isset($this->objectHandlers[$class])) {
178
-            return $this->objectHandlers[$class]->handle($object);
177
+        if (isset($this->objectHandlers[ $class ])) {
178
+            return $this->objectHandlers[ $class ]->handle($object);
179 179
         }
180 180
 
181 181
         throw new \LogicException(sprintf('Unsupported instance of "%s" given.', $class));
Please login to merge, or discard this patch.
src/Response/JsonApiObjectView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      * @param int   $status
26 26
      * @param array $headers
27 27
      */
28
-    public function __construct($object, int $status = 200, array $headers = [])
28
+    public function __construct($object, int $status = 200, array $headers = [ ])
29 29
     {
30 30
         $this->object  = $object;
31 31
         $this->status  = $status;
Please login to merge, or discard this patch.
src/Response/AbstractJsonApiView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      *
23 23
      * @var array
24 24
      */
25
-    protected $headers = [];
25
+    protected $headers = [ ];
26 26
 
27 27
     /**
28 28
      * Get status code
Please login to merge, or discard this patch.
src/Response/JsonApiIteratorView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      * @param int          $status
26 26
      * @param array        $headers
27 27
      */
28
-    public function __construct(\Traversable $iterator, int $status = 200, array $headers = [])
28
+    public function __construct(\Traversable $iterator, int $status = 200, array $headers = [ ])
29 29
     {
30 30
         $this->iterator = $iterator;
31 31
         $this->status   = $status;
Please login to merge, or discard this patch.
src/Response/JsonApiDocumentView.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * @param int              $status
28 28
      * @param array            $headers
29 29
      */
30
-    public function __construct(AbstractDocument $document, int $status = 200, array $headers = [])
30
+    public function __construct(AbstractDocument $document, int $status = 200, array $headers = [ ])
31 31
     {
32 32
         $this->document = $document;
33 33
         $this->status   = $status;
Please login to merge, or discard this patch.