@@ -50,7 +50,7 @@ |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | return new Links( |
53 | - Collection::wrap((array) $data) |
|
53 | + Collection::wrap((array)$data) |
|
54 | 54 | ->map(fn ($link, $name) => $this->buildLink($link, $name)) |
55 | 55 | ->toArray() |
56 | 56 | ); |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | $item = $this->getItemInstance($data->type); |
64 | - $item->setId((string) $data->id); |
|
64 | + $item->setId((string)$data->id); |
|
65 | 65 | |
66 | 66 | if (property_exists($data, 'attributes')) { |
67 | - $item->fill((array) $data->attributes); |
|
67 | + $item->fill((array)$data->attributes); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | if (property_exists($data, 'relationships')) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | throw new ValidationException(sprintf('ResourceIdentifier property "id" MUST be a string, "%s" given.', gettype($data->id))); |
173 | 173 | } |
174 | 174 | |
175 | - $item = $this->getItemInstance($data->type)->setId((string) $data->id); |
|
175 | + $item = $this->getItemInstance($data->type)->setId((string)$data->id); |
|
176 | 176 | if (property_exists($data, 'meta')) { |
177 | 177 | $item->setMeta($this->metaParser->parse($data->meta)); |
178 | 178 | } |
@@ -51,13 +51,13 @@ |
||
51 | 51 | { |
52 | 52 | return Collection::make($item->getRelations()) |
53 | 53 | ->reject( |
54 | - static function ($relationship) { |
|
54 | + static function($relationship) { |
|
55 | 55 | /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */ |
56 | 56 | return $relationship->shouldOmitIncluded() || !$relationship->hasIncluded(); |
57 | 57 | } |
58 | 58 | ) |
59 | 59 | ->flatMap( |
60 | - static function ($relationship) { |
|
60 | + static function($relationship) { |
|
61 | 61 | /* @var \Swis\JsonApi\Client\Interfaces\OneRelationInterface|\Swis\JsonApi\Client\Interfaces\ManyRelationInterface $relationship */ |
62 | 62 | return Collection::wrap($relationship->getIncluded()); |
63 | 63 | } |
@@ -76,6 +76,6 @@ |
||
76 | 76 | #[\ReturnTypeWillChange] |
77 | 77 | public function jsonSerialize() |
78 | 78 | { |
79 | - return (object) $this->toArray(); |
|
79 | + return (object)$this->toArray(); |
|
80 | 80 | } |
81 | 81 | } |