Completed
Push — master ( 81f4cf...64f3d3 )
by Jasper
13s queued 10s
created
src/Items/EloquentItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 $included = $included->merge($relation->getIncluded());
132 132
             } elseif ($relation instanceof IlluminateCollection) {
133 133
                 $relation->each(
134
-                    function (ItemInterface $item) use (&$included) {
134
+                    function(ItemInterface $item) use (&$included) {
135 135
                         if (!empty($item->getType()) && null !== $item->getId()) {
136 136
                             $included->push($item->toJsonApiArray());
137 137
                         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         }
145 145
 
146 146
         return $included->unique(
147
-            function (array $item) {
147
+            function(array $item) {
148 148
                 return $item['type'].':'.$item['id'];
149 149
             }
150 150
         );
Please login to merge, or discard this patch.
src/Items/JenssegersItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
                 $included = $included->merge($includedFromRelationship->getIncluded());
201 201
             } elseif ($includedFromRelationship instanceof Collection) {
202 202
                 $includedFromRelationship->each(
203
-                    function (ItemInterface $item) use (&$included) {
203
+                    function(ItemInterface $item) use (&$included) {
204 204
                         if (!empty($item->getType()) && null !== $item->getId()) {
205 205
                             $included->push($item->toJsonApiArray());
206 206
                         }
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         }
214 214
 
215 215
         return $included->unique(
216
-            function (array $item) {
216
+            function(array $item) {
217 217
                 return $item['type'].':'.$item['id'];
218 218
             }
219 219
         );
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function toJsonApiArray(): array
15 15
     {
16 16
         return array_map(
17
-            function ($value) {
17
+            function($value) {
18 18
                 return $value instanceof DataInterface ? $value->toJsonApiArray() : $value;
19 19
             },
20 20
             $this->items
Please login to merge, or discard this patch.
src/Providers/ServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     {
47 47
         $this->app->singleton(
48 48
             TypeMapperInterface::class,
49
-            function () {
49
+            function() {
50 50
                 return new TypeMapper();
51 51
             }
52 52
         );
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $this->app->bind(
58 58
             ParserInterface::class,
59
-            function (Application $app) {
59
+            function(Application $app) {
60 60
                 return new Parser(
61 61
                     new JsonApiClientManger(),
62 62
                     new Hydrator($app->make(TypeMapperInterface::class)),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         $this->app->bind(
72 72
             ApiClientInterface::class,
73
-            function () {
73
+            function() {
74 74
                 return new ApiClient(
75 75
                     $this->getHttpClient(),
76 76
                     config('jsonapi.base_uri'),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         $this->app->bind(
83 83
             ApiDocumentClientInterface::class,
84
-            function (Application $app) {
84
+            function(Application $app) {
85 85
                 return new ApiDocumentClient(
86 86
                     $app->make(ApiClientInterface::class),
87 87
                     new ItemDocumentSerializer(),
Please login to merge, or discard this patch.
src/JsonApi/Hydrator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
     public function hydrateRelationships(Collection $jsonApiItems, Collection $items)
69 69
     {
70 70
         $keyedItems = $items->reverse()->keyBy(
71
-            function (ItemInterface $item) {
71
+            function(ItemInterface $item) {
72 72
                 return $this->getItemKey($item);
73 73
             }
74 74
         );
75 75
 
76 76
         $jsonApiItems->each(
77
-            function (ResourceItemInterface $jsonApiItem) use ($keyedItems) {
77
+            function(ResourceItemInterface $jsonApiItem) use ($keyedItems) {
78 78
                 if (!$jsonApiItem->has('relationships')) {
79 79
                     return;
80 80
                 }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     {
133 133
         return $included->get(
134 134
             $this->getElementKey($identifier),
135
-            function () {
135
+            function() {
136 136
                 return new NullItem();
137 137
             }
138 138
         );
Please login to merge, or discard this patch.