@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | $this->response = $this->response->withStatus($status); |
| 183 | 183 | $errorData = [ |
| 184 | - 'status' => (string)$status, |
|
| 184 | + 'status' => (string) $status, |
|
| 185 | 185 | 'title' => $error->getMessage(), |
| 186 | 186 | ]; |
| 187 | 187 | $this->set('error', $errorData); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $response = $this->maskMultiLinks($response, 'meta.resources', 'href'); |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - $data = (array)Hash::get($response, 'data'); |
|
| 216 | + $data = (array) Hash::get($response, 'data'); |
|
| 217 | 217 | if (empty($data)) { |
| 218 | 218 | return $response; |
| 219 | 219 | } |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $response['data'] = $this->maskMultiLinks($data); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | - return (array)$response; |
|
| 231 | + return (array) $response; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | /** |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function embedIncluded(array $response): array |
| 34 | 34 | { |
| 35 | - $data = (array)Hash::get($response, 'data'); |
|
| 35 | + $data = (array) Hash::get($response, 'data'); |
|
| 36 | 36 | if (empty($data)) { |
| 37 | 37 | return $response; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - $included = (array)Hash::get($response, 'included'); |
|
| 40 | + $included = (array) Hash::get($response, 'included'); |
|
| 41 | 41 | if (empty($included)) { |
| 42 | 42 | return $response; |
| 43 | 43 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | continue; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - $relation['data'] = $this->extractFromIncluded($included, (array)$relation['data']); |
|
| 76 | + $relation['data'] = $this->extractFromIncluded($included, (array) $relation['data']); |
|
| 77 | 77 | } |
| 78 | 78 | unset($relation); |
| 79 | 79 | |
@@ -92,13 +92,13 @@ discard block |
||
| 92 | 92 | { |
| 93 | 93 | // case is 1-1 relationship - object relation in translations is a special case |
| 94 | 94 | if (array_key_exists('id', $relationshipData)) { |
| 95 | - return (array)$included->firstMatch([ |
|
| 95 | + return (array) $included->firstMatch([ |
|
| 96 | 96 | 'type' => $relationshipData['type'], |
| 97 | 97 | 'id' => $relationshipData['id'], |
| 98 | 98 | ]); |
| 99 | 99 | } |
| 100 | 100 | foreach ($relationshipData as &$data) { |
| 101 | - $data = (array)$included->firstMatch([ |
|
| 101 | + $data = (array) $included->firstMatch([ |
|
| 102 | 102 | 'type' => $data['type'], |
| 103 | 103 | 'id' => $data['id'], |
| 104 | 104 | ]); |