Passed
Branch master (bb2742)
by Jasper
06:02
created
Category
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/JsonApi/Hydrator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function hydrateRelationships(Collection $jsonApiItems, Collection $items)
96 96
     {
97 97
         $jsonApiItems->each(
98
-            function (JsonApItem $jsonApiItem) use ($items) {
98
+            function(JsonApItem $jsonApiItem) use ($items) {
99 99
                 if (!$jsonApiItem->has('relationships')) {
100 100
                     return;
101 101
                 }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     protected function getIncludedItem(Collection $included, AccessInterface $accessor): ItemInterface
151 151
     {
152 152
         return $included->first(
153
-            function (ItemInterface $item) use ($accessor) {
153
+            function(ItemInterface $item) use ($accessor) {
154 154
                 return $this->accessorBelongsToItem($accessor, $item);
155 155
             },
156 156
             new NullItem()
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     protected function getIncludedItems(Collection $included, IdentifierCollection $collection): Collection
179 179
     {
180 180
         return $included->filter(
181
-            function (ItemInterface $item) use ($collection) {
181
+            function(ItemInterface $item) use ($collection) {
182 182
                 return $this->itemExistsInRelatedIdentifiers($collection->asArray(false), $item);
183 183
             }
184 184
         )->values();
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.