feat: analyse import + all tests fixed

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-10-15 16:14:15 +02:00
parent fbe9619224
commit 3170a7c60e
74 changed files with 4318 additions and 183 deletions

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace App\Domain\Manga\Application\Response;
readonly class MangaMatchItem
{
public function __construct(
public string $id,
public string $title,
public string $slug,
public array $alternativeSlugs,
public ?string $thumbnailUrl,
public int $matchScore,
public ?float $chapterNumber = null,
public ?float $volumeNumber = null
) {
}
}

View File

@@ -0,0 +1,30 @@
<?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;
}
}