mangaProvider->search($query->title); return new MangaSearchResponse( array_map( fn (Manga $manga, int $index) => new MangaSearchItem( id: $index, externalId: $manga->getExternalId()->getValue(), title: $manga->getTitle()->getValue(), slug: $manga->getSlug()->getValue(), description: $manga->getDescription(), author: $manga->getAuthor(), publicationYear: $manga->getPublicationYear(), genres: $manga->getGenres(), status: $manga->getStatus(), imageUrl: $manga->getImageUrl(), thumbnailUrl: $manga->getImageUrls()?->getThumbnail(), rating: $manga->getRating() ), $mangaCollection->getItems(), array_keys($mangaCollection->getItems()) ) ); } }