Passed
Push — master ( 975c2f...d51421 )
by Jasper
13:00 queued 01:21
created
src/Links.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function toArray()
113 113
     {
114 114
         return array_map(
115
-            static function (?Link $link) {
115
+            static function(?Link $link) {
116 116
                 return $link ? $link->toArray() : null;
117 117
             },
118 118
             $this->links
@@ -138,6 +138,6 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function jsonSerialize()
140 140
     {
141
-        return (object) $this->toArray();
141
+        return (object)$this->toArray();
142 142
     }
143 143
 }
Please login to merge, or discard this patch.
src/Jsonapi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,6 +133,6 @@
 block discarded – undo
133 133
      */
134 134
     public function jsonSerialize()
135 135
     {
136
-        return (object) $this->toArray();
136
+        return (object)$this->toArray();
137 137
     }
138 138
 }
Please login to merge, or discard this patch.
src/Parsers/DocumentParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -202,13 +202,13 @@  discard block
 block discarded – undo
202 202
     private function linkRelationships(Collection $items): void
203 203
     {
204 204
         $keyedItems = $items->keyBy(
205
-            function (ItemInterface $item) {
205
+            function(ItemInterface $item) {
206 206
                 return $this->getItemKey($item);
207 207
             }
208 208
         );
209 209
 
210 210
         $items->each(
211
-            function (ItemInterface $item) use ($keyedItems) {
211
+            function(ItemInterface $item) use ($keyedItems) {
212 212
                 foreach ($item->getRelations() as $name => $relation) {
213 213
                     if ($relation instanceof OneRelationInterface) {
214 214
                         /** @var \Swis\JsonApi\Client\Interfaces\ItemInterface|null $relatedItem */
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */
268 268
     private function getDuplicateItems(Collection $items): Collection
269 269
     {
270
-        $valueRetriever = function (ItemInterface $item) {
270
+        $valueRetriever = function(ItemInterface $item) {
271 271
             return $this->getItemKey($item);
272 272
         };
273 273
 
Please login to merge, or discard this patch.
src/Concerns/HasAttributes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -306,16 +306,16 @@  discard block
 block discarded – undo
306 306
         switch ($this->getCastType($key)) {
307 307
             case 'int':
308 308
             case 'integer':
309
-                return (int) $value;
309
+                return (int)$value;
310 310
             case 'real':
311 311
             case 'float':
312 312
             case 'double':
313 313
                 return $this->fromFloat($value);
314 314
             case 'string':
315
-                return (string) $value;
315
+                return (string)$value;
316 316
             case 'bool':
317 317
             case 'boolean':
318
-                return (bool) $value;
318
+                return (bool)$value;
319 319
             case 'object':
320 320
                 return $this->fromJson($value, true);
321 321
             case 'array':
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
      */
426 426
     public function fromFloat($value)
427 427
     {
428
-        switch ((string) $value) {
428
+        switch ((string)$value) {
429 429
             case 'Infinity':
430 430
                 return INF;
431 431
             case '-Infinity':
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             case 'NaN':
434 434
                 return NAN;
435 435
             default:
436
-                return (float) $value;
436
+                return (float)$value;
437 437
         }
438 438
     }
439 439
 
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     public function hasCast($key, $types = null)
449 449
     {
450 450
         if (array_key_exists($key, $this->getCasts())) {
451
-            return $types ? in_array($this->getCastType($key), (array) $types, true) : true;
451
+            return $types ? in_array($this->getCastType($key), (array)$types, true) : true;
452 452
         }
453 453
 
454 454
         return false;
Please login to merge, or discard this patch.
src/ItemHydrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -204,6 +204,6 @@
 block discarded – undo
204 204
             $item = $this->typeMapper->getMapping($type);
205 205
         }
206 206
 
207
-        return $this->hydrate($item, $attributes, (string) $attributes['id']);
207
+        return $this->hydrate($item, $attributes, (string)$attributes['id']);
208 208
     }
209 209
 }
Please login to merge, or discard this patch.
src/Parsers/ItemParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         $item = $this->getItemInstance($data->type);
78
-        $item->setId((string) $data->id);
78
+        $item->setId((string)$data->id);
79 79
 
80 80
         if (property_exists($data, 'attributes')) {
81
-            $item->fill((array) $data->attributes);
81
+            $item->fill((array)$data->attributes);
82 82
         }
83 83
 
84 84
         if (property_exists($data, 'relationships')) {
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         if (is_array($data)) {
169 169
             return Collection::make($data)
170 170
                 ->map(
171
-                    function ($identifier) {
171
+                    function($identifier) {
172 172
                         return $this->parseRelationshipData($identifier);
173 173
                     }
174 174
                 );
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             throw new ValidationException(sprintf('ResourceIdentifier property "id" MUST be a string, "%s" given.', gettype($data->id)));
191 191
         }
192 192
 
193
-        $item = $this->getItemInstance($data->type)->setId((string) $data->id);
193
+        $item = $this->getItemInstance($data->type)->setId((string)$data->id);
194 194
         if (property_exists($data, 'meta')) {
195 195
             $item->setMeta($this->metaParser->parse($data->meta));
196 196
         }
Please login to merge, or discard this patch.
src/Item.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function forceFill(array $attributes)
85 85
     {
86
-        return static::unguarded(function () use ($attributes) {
86
+        return static::unguarded(function() use ($attributes) {
87 87
             return $this->fill($attributes);
88 88
         });
89 89
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     {
119 119
         $instance = new static();
120 120
 
121
-        return array_map(static function ($item) use ($instance) {
121
+        return array_map(static function($item) use ($instance) {
122 122
             return $instance->newInstance($item);
123 123
         }, $items);
124 124
     }
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     public function offsetSet($offset, $value)
381 381
     {
382 382
         if ($offset === 'id') {
383
-            $this->setId($value ? (string) $value : null);
383
+            $this->setId($value ? (string)$value : null);
384 384
 
385 385
             return;
386 386
         }
Please login to merge, or discard this patch.