Skip to content

Commit

Permalink
refactor: Fix return type
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Jan 29, 2024
1 parent 021af98 commit cb0193f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/services/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function getAuthToken(): ?string
*
* @param string $path
* @param array|string[] $params
* @return array|string[]
* @return array
*/
public function cantoApiRequest(string $path, array $params = []): array
{
Expand Down Expand Up @@ -111,12 +111,12 @@ public function fetchFieldDataByCantoId(string $cantoId): ?CantoFieldData
}

return new CantoFieldData([
'cantoId' => $responseBody['id'],
'cantoId' => $responseBody['id'] ?? 0,
'cantoAlbumId' => 0,
'cantoAssetData' => [$responseBody],
'cantoAlbumData' => [
'id' => $responseBody['relatedAlbums'][0]['id'],
'name' => $responseBody['relatedAlbums'][0]['name'],
'id' => $responseBody['relatedAlbums'][0]['id'] ?? 0,
'name' => $responseBody['relatedAlbums'][0]['name'] ?? '',
],
]);
}
Expand Down

0 comments on commit cb0193f

Please sign in to comment.