diff --git a/src/API/Kitsu.php b/src/API/Kitsu.php index 117f7bdd..11f947c5 100644 --- a/src/API/Kitsu.php +++ b/src/API/Kitsu.php @@ -235,7 +235,7 @@ class Kitsu { * @param array $existingTitles * @return bool */ - private static function titleIsUnique(string $title = null, array $existingTitles): bool + private static function titleIsUnique(string $title = null, array $existingTitles = []): bool { if (empty($title)) { diff --git a/src/API/Kitsu/Transformer/MangaListTransformer.php b/src/API/Kitsu/Transformer/MangaListTransformer.php index cd41809a..81d7bcf4 100644 --- a/src/API/Kitsu/Transformer/MangaListTransformer.php +++ b/src/API/Kitsu/Transformer/MangaListTransformer.php @@ -42,11 +42,11 @@ class MangaListTransformer extends AbstractTransformer { ? intval(2 * $item['attributes']['rating']) : '-'; - $total_chapters = ($manga['attributes']['chapterCount'] > 0) + $totalChapters = ($manga['attributes']['chapterCount'] > 0) ? $manga['attributes']['chapterCount'] : '-'; - $total_volumes = ($manga['attributes']['volumeCount'] > 0) + $totalVolumes = ($manga['attributes']['volumeCount'] > 0) ? $manga['attributes']['volumeCount'] : '-'; @@ -54,11 +54,11 @@ class MangaListTransformer extends AbstractTransformer { 'id' => $item['id'], 'chapters' => [ 'read' => $item['attributes']['progress'], - 'total' => $total_chapters + 'total' => $totalChapters ], 'volumes' => [ 'read' => '-', //$item['attributes']['volumes_read'], - 'total' => $total_volumes + 'total' => $totalVolumes ], 'manga' => [ 'titles' => Kitsu::filterTitles($manga['attributes']),