@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | public static function inlineRawIncludes(array &$data, string $key): array |
46 | 46 | { |
47 | - foreach($data['data'] as $i => &$item) |
|
47 | + foreach ($data['data'] as $i => &$item) |
|
48 | 48 | { |
49 | 49 | $item[$key] = $data['included'][$i]; |
50 | 50 | } |
@@ -70,10 +70,10 @@ discard block |
||
70 | 70 | // Duplicate the item for the output |
71 | 71 | $inlined[$key][$itemId] = $item; |
72 | 72 | |
73 | - foreach($item['relationships'] as $type => $ids) |
|
73 | + foreach ($item['relationships'] as $type => $ids) |
|
74 | 74 | { |
75 | 75 | $inlined[$key][$itemId]['relationships'][$type] = []; |
76 | - foreach($ids as $id) |
|
76 | + foreach ($ids as $id) |
|
77 | 77 | { |
78 | 78 | $inlined[$key][$itemId]['relationships'][$type][$id] = $included[$type][$id]; |
79 | 79 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | { |
126 | 126 | $organized = []; |
127 | 127 | |
128 | - foreach($relationships as $key => $data) |
|
128 | + foreach ($relationships as $key => $data) |
|
129 | 129 | { |
130 | 130 | if ( ! array_key_exists('data', $data)) |
131 | 131 | { |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $data = $this->getRequest("anime/{$kitsuAnimeId}", $options); |
185 | 185 | $mappings = array_column($data['included'], 'attributes'); |
186 | 186 | |
187 | - foreach($mappings as $map) |
|
187 | + foreach ($mappings as $map) |
|
188 | 188 | { |
189 | 189 | if ($map['externalSite'] === 'myanimelist/anime') |
190 | 190 | { |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | $included = JsonAPI::organizeIncludes($data['included']); |
265 | 265 | $included = JsonAPI::inlineIncludedRelationships($included, 'anime'); |
266 | 266 | |
267 | - foreach($data['data'] as $i => &$item) |
|
267 | + foreach ($data['data'] as $i => &$item) |
|
268 | 268 | { |
269 | 269 | $item['included'] = $included; |
270 | 270 | } |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | 'body' => $response->getBody(), |
410 | 410 | ]; |
411 | 411 | } |
412 | - catch(ClientException $e) |
|
412 | + catch (ClientException $e) |
|
413 | 413 | { |
414 | 414 | return [ |
415 | 415 | 'statusCode' => $e->getResponse()->getStatusCode(), |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * Anime List Client |
4 | 4 | * |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $response = $this->getResponse($type, $url, $options); |
141 | 141 | |
142 | - if ((int) $response->getStatusCode() > 299 || (int) $response->getStatusCode() < 200) |
|
142 | + if ((int)$response->getStatusCode() > 299 || (int)$response->getStatusCode() < 200) |
|
143 | 143 | { |
144 | 144 | if ($logger) |
145 | 145 | { |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $response = $this->getResponse('POST', ...$args); |
190 | 190 | $validResponseCodes = [200, 201]; |
191 | 191 | |
192 | - if ( ! in_array((int) $response->getStatusCode(), $validResponseCodes)) |
|
192 | + if ( ! in_array((int)$response->getStatusCode(), $validResponseCodes)) |
|
193 | 193 | { |
194 | 194 | if ($logger) |
195 | 195 | { |
@@ -209,6 +209,6 @@ discard block |
||
209 | 209 | protected function deleteRequest(...$args): bool |
210 | 210 | { |
211 | 211 | $response = $this->getResponse('DELETE', ...$args); |
212 | - return ((int) $response->getStatusCode() === 204); |
|
212 | + return ((int)$response->getStatusCode() === 204); |
|
213 | 213 | } |
214 | 214 | } |
215 | 215 | \ No newline at end of file |