diff --git a/src/Domain/Manga/Application/QueryHandler/GetMangaChaptersHandler.php b/src/Domain/Manga/Application/QueryHandler/GetMangaChaptersHandler.php index a36cfc2..b486adf 100644 --- a/src/Domain/Manga/Application/QueryHandler/GetMangaChaptersHandler.php +++ b/src/Domain/Manga/Application/QueryHandler/GetMangaChaptersHandler.php @@ -103,7 +103,9 @@ readonly class GetMangaChaptersHandler $min = min($numbers); $max = max($numbers); - $fmt = fn (float $n) => $n == (int) $n ? (string) (int) $n : (string) $n; + $fmt = fn (float $n) => $n == (int) $n + ? str_pad((string) (int) $n, 2, '0', STR_PAD_LEFT) + : (string) $n; $range = count($group) > 1 ? $fmt($min).'-'.$fmt($max) : $fmt($min); return new ChapterResponse(