chore: rattrapage
This commit is contained in:
parent
8e1c4637ba
commit
7fba3c6fcb
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user