Passed
Push — master ( 295d69...f45702 )
by Jasper
02:00
created
src/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -383,7 +383,7 @@
 block discarded – undo
383 383
     public function offsetSet($offset, $value)
384 384
     {
385 385
         if ($offset === 'id') {
386
-            $this->setId($value ? (string) $value : null);
386
+            $this->setId($value ? (string)$value : null);
387 387
 
388 388
             return;
389 389
         }
Please login to merge, or discard this patch.
src/Parsers/DocumentParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
179 179
         $keyedItems = $items->keyBy(fn (ItemInterface $item) => $this->getItemKey($item));
180 180
 
181 181
         $items->each(
182
-            function (ItemInterface $item) use ($keyedItems) {
182
+            function(ItemInterface $item) use ($keyedItems) {
183 183
                 foreach ($item->getRelations() as $name => $relation) {
184 184
                     if ($relation instanceof OneRelationInterface) {
185 185
                         /** @var \Swis\JsonApi\Client\Interfaces\ItemInterface|null $relatedItem */
Please login to merge, or discard this patch.
src/Parsers/LinksParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         }
51 51
 
52 52
         return new Links(
53
-            Collection::wrap((array) $data)
53
+            Collection::wrap((array)$data)
54 54
                 ->map(fn ($link, $name) => $this->buildLink($link, $name))
55 55
                 ->toArray()
56 56
         );
Please login to merge, or discard this patch.
src/Parsers/ItemParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
         }
62 62
 
63 63
         $item = $this->getItemInstance($data->type);
64
-        $item->setId((string) $data->id);
64
+        $item->setId((string)$data->id);
65 65
 
66 66
         if (property_exists($data, 'attributes')) {
67
-            $item->fill((array) $data->attributes);
67
+            $item->fill((array)$data->attributes);
68 68
         }
69 69
 
70 70
         if (property_exists($data, 'relationships')) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             throw new ValidationException(sprintf('ResourceIdentifier property "id" MUST be a string, "%s" given.', gettype($data->id)));
173 173
         }
174 174
 
175
-        $item = $this->getItemInstance($data->type)->setId((string) $data->id);
175
+        $item = $this->getItemInstance($data->type)->setId((string)$data->id);
176 176
         if (property_exists($data, 'meta')) {
177 177
             $item->setMeta($this->metaParser->parse($data->meta));
178 178
         }
Please login to merge, or discard this patch.
src/DocumentFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,13 +51,13 @@
 block discarded – undo
51 51
     {
52 52
         return Collection::make($item->getRelations())
53 53
             ->reject(
54
-                static function ($relationship) {
54
+                static function($relationship) {
55 55
                     /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */
56 56
                     return $relationship->shouldOmitIncluded() || !$relationship->hasIncluded();
57 57
                 }
58 58
             )
59 59
             ->flatMap(
60
-                static function ($relationship) {
60
+                static function($relationship) {
61 61
                     /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */
62 62
                     return Collection::wrap($relationship->getIncluded());
63 63
                 }
Please login to merge, or discard this patch.
src/Links.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,6 @@
 block discarded – undo
76 76
     #[\ReturnTypeWillChange]
77 77
     public function jsonSerialize()
78 78
     {
79
-        return (object) $this->toArray();
79
+        return (object)$this->toArray();
80 80
     }
81 81
 }
Please login to merge, or discard this patch.