Passed
Pull Request — master (#93)
by Jasper
13:24
created
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/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((string) $value);
383
+            $this->setId((string)$value);
384 384
 
385 385
             return;
386 386
         }
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.