@@ -25,12 +25,12 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function embedIncluded(array $response): array |
27 | 27 | { |
28 | - $data = (array)Hash::get($response, 'data'); |
|
28 | + $data = (array) Hash::get($response, 'data'); |
|
29 | 29 | if (empty($data)) { |
30 | 30 | return $response; |
31 | 31 | } |
32 | 32 | |
33 | - $included = (array)Hash::get($response, 'included'); |
|
33 | + $included = (array) Hash::get($response, 'included'); |
|
34 | 34 | if (empty($included)) { |
35 | 35 | return $response; |
36 | 36 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | continue; |
67 | 67 | } |
68 | 68 | |
69 | - $relation['data'] = $this->extractFromIncluded($included, (array)$relation['data']); |
|
69 | + $relation['data'] = $this->extractFromIncluded($included, (array) $relation['data']); |
|
70 | 70 | } |
71 | 71 | unset($relation); |
72 | 72 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | protected function extractFromIncluded(Collection $included, array $relationshipData): array |
85 | 85 | { |
86 | 86 | foreach ($relationshipData as &$data) { |
87 | - $data = (array)$included->firstMatch([ |
|
87 | + $data = (array) $included->firstMatch([ |
|
88 | 88 | 'type' => $data['type'], |
89 | 89 | 'id' => $data['id'], |
90 | 90 | ]); |