@@ -177,13 +177,13 @@ discard block |
||
177 | 177 | private function linkRelationships(Collection $items): void |
178 | 178 | { |
179 | 179 | $keyedItems = $items->keyBy( |
180 | - function (ItemInterface $item) { |
|
180 | + function(ItemInterface $item) { |
|
181 | 181 | return $this->getItemKey($item); |
182 | 182 | } |
183 | 183 | ); |
184 | 184 | |
185 | 185 | $items->each( |
186 | - function (ItemInterface $item) use ($keyedItems) { |
|
186 | + function(ItemInterface $item) use ($keyedItems) { |
|
187 | 187 | foreach ($item->getRelations() as $name => $relation) { |
188 | 188 | if ($relation instanceof OneRelationInterface) { |
189 | 189 | /** @var \Swis\JsonApi\Client\Interfaces\ItemInterface|null $relatedItem */ |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | private function getDuplicateItems(Collection $items): Collection |
244 | 244 | { |
245 | - $valueRetriever = function (ItemInterface $item) { |
|
245 | + $valueRetriever = function(ItemInterface $item) { |
|
246 | 246 | return $this->getItemKey($item); |
247 | 247 | }; |
248 | 248 | |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | |
261 | 261 | $uniqueValues = $values->unique(); |
262 | 262 | |
263 | - $compare = static function ($a, $b) { |
|
263 | + $compare = static function($a, $b) { |
|
264 | 264 | return $a === $b; |
265 | 265 | }; |
266 | 266 |
@@ -133,6 +133,6 @@ |
||
133 | 133 | */ |
134 | 134 | public function jsonSerialize() |
135 | 135 | { |
136 | - return (object) $this->toArray(); |
|
136 | + return (object)$this->toArray(); |
|
137 | 137 | } |
138 | 138 | } |
@@ -227,6 +227,6 @@ |
||
227 | 227 | $document['jsonapi'] = $this->getJsonapi(); |
228 | 228 | } |
229 | 229 | |
230 | - return (object) $document; |
|
230 | + return (object)$document; |
|
231 | 231 | } |
232 | 232 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | public function toArray() |
113 | 113 | { |
114 | 114 | return array_map( |
115 | - static function (?Link $link) { |
|
115 | + static function(?Link $link) { |
|
116 | 116 | return $link ? $link->toArray() : null; |
117 | 117 | }, |
118 | 118 | $this->links |
@@ -138,6 +138,6 @@ discard block |
||
138 | 138 | */ |
139 | 139 | public function jsonSerialize() |
140 | 140 | { |
141 | - return (object) $this->toArray(); |
|
141 | + return (object)$this->toArray(); |
|
142 | 142 | } |
143 | 143 | } |
@@ -133,6 +133,6 @@ |
||
133 | 133 | */ |
134 | 134 | public function jsonSerialize() |
135 | 135 | { |
136 | - return (object) $this->toArray(); |
|
136 | + return (object)$this->toArray(); |
|
137 | 137 | } |
138 | 138 | } |