Merge pull request 'fix(manga): conserver le padding du numéro de chapitre après scraping' (#48) from fix/chapter-number-padding-after-scraping into main
All checks were successful
Deploy / deploy (push) Successful in 1m5s
All checks were successful
Deploy / deploy (push) Successful in 1m5s
Reviewed-on: #48
This commit was merged in pull request #48.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user