@@ -54,7 +54,7 @@ |
||
| 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'), |
@@ -143,13 +143,13 @@ |
||
| 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 */ |
@@ -134,7 +134,7 @@ |
||
| 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 | } |
@@ -33,7 +33,7 @@ |
||
| 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 | ); |