Completed
Pull Request — master (#54)
by Jasper
14:39
created
src/Providers/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     {
55 55
         $this->app->bind(
56 56
             ClientInterface::class,
57
-            function () {
57
+            function() {
58 58
                 return new Client(
59 59
                     $this->getHttpClient(),
60 60
                     config('jsonapi.base_uri'),
Please login to merge, or discard this patch.
src/Parsers/DocumentParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,13 +143,13 @@
 block discarded – undo
143 143
     {
144 144
         // N.B. We reverse the items to make sure the first item in the collection takes precedence
145 145
         $keyedItems = $items->reverse()->keyBy(
146
-            function (ItemInterface $item) {
146
+            function(ItemInterface $item) {
147 147
                 return $this->getItemKey($item);
148 148
             }
149 149
         );
150 150
 
151 151
         $items->each(
152
-            function (ItemInterface $item) use ($keyedItems) {
152
+            function(ItemInterface $item) use ($keyedItems) {
153 153
                 foreach ($item->getRelations() as $name => $relation) {
154 154
                     if ($relation instanceof OneRelationInterface) {
155 155
                         /** @var \Swis\JsonApi\Client\Interfaces\ItemInterface $relatedItem */
Please login to merge, or discard this patch.
src/Parsers/ItemParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
         if ($data instanceof ResourceIdentifierCollectionInterface) {
135 135
             return Collection::make($data->asArray())
136 136
                 ->map(
137
-                    function (ResourceIdentifierInterface $identifier) {
137
+                    function(ResourceIdentifierInterface $identifier) {
138 138
                         return $this->getItemInstance($identifier->get('type'))
139 139
                             ->setId($identifier->get('id'));
140 140
                     }
Please login to merge, or discard this patch.
src/Parsers/CollectionParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         return Collection::make($jsonApiCollection->asArray())
35 35
             ->map(
36
-                function (ResourceItemInterface $item) {
36
+                function(ResourceItemInterface $item) {
37 37
                     return $this->itemParser->parse($item);
38 38
                 }
39 39
             );
Please login to merge, or discard this patch.