Files
Mangarr/src/Domain/Manga/Application/Response/MangaMatchResponse.php
ext.jeremy.guillot@maxicoffee.domains 7506a7a3c1 style: apply php-cs-fixer formatting (PSR-12)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 20:46:59 +01:00

30 lines
568 B
PHP

<?php
declare(strict_types=1);
namespace App\Domain\Manga\Application\Response;
readonly class MangaMatchResponse
{
/**
* @param MangaMatchItem[] $matches
*/
public function __construct(
public array $matches,
public ?float $chapterNumber,
public ?float $volumeNumber,
public array $possibleTitles
) {
}
public function hasMatches(): bool
{
return count($this->matches) > 0;
}
public function getBestMatch(): ?MangaMatchItem
{
return $this->matches[0] ?? null;
}
}