chore: rattrapage

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2026-03-14 00:45:29 +01:00
parent 8e1c4637ba
commit 7fba3c6fcb
14 changed files with 87 additions and 23 deletions

View File

@@ -135,6 +135,14 @@ class InMemoryMangaRepository implements MangaRepositoryInterface
return count($this->chapters[$mangaId] ?? []);
}
public function countAvailableChapters(string $mangaId): int
{
return count(array_filter(
$this->chapters[$mangaId] ?? [],
fn (Chapter $c) => $c->isAvailable()
));
}
public function findChapterById(string $id): ?Chapter
{
return $this->chaptersById[$id] ?? null;