style: apply php-cs-fixer formatting (PSR-12)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
dae215dd3d
commit
7506a7a3c1
@@ -18,7 +18,8 @@ final class ImportChapterController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ImportChapterHandler $commandHandler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function __invoke(Request $request): Response
|
||||
{
|
||||
@@ -139,7 +140,3 @@ final class ImportChapterController extends AbstractController
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ final class ImportVolumeController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ImportVolumeHandler $commandHandler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function __invoke(Request $request): Response
|
||||
{
|
||||
@@ -132,7 +133,3 @@ final class ImportVolumeController extends AbstractController
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,5 +12,6 @@ readonly class ChapterCollection
|
||||
public int $limit,
|
||||
public bool $hasNextPage,
|
||||
public bool $hasPreviousPage
|
||||
) {}
|
||||
}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,5 +15,6 @@ readonly class ChapterListItem
|
||||
public bool $isVisible,
|
||||
public bool $isAvailable,
|
||||
public string $createdAt
|
||||
) {}
|
||||
}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,3 @@ readonly class FilenameMatchCollection
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,4 +18,3 @@ readonly class FilenameMatchItem
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,5 +14,6 @@ readonly class MangaCollection
|
||||
public int $limit,
|
||||
public bool $hasNextPage,
|
||||
public bool $hasPreviousPage
|
||||
) {}
|
||||
}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,5 +22,6 @@ readonly class MangaDetail
|
||||
public ?string $thumbnailUrl,
|
||||
public ?float $rating,
|
||||
public bool $monitored
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,6 @@ readonly class MangaListItem
|
||||
public string $status,
|
||||
public ?float $rating,
|
||||
public DateTimeImmutable $createdAt,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,5 +7,6 @@ readonly class MangaSearchCollection
|
||||
public function __construct(
|
||||
/** @var MangaSearchItem[] */
|
||||
public array $items
|
||||
) {}
|
||||
}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,5 +19,6 @@ readonly class MangaSearchItem
|
||||
public ?string $imageUrl,
|
||||
public ?string $thumbnailUrl,
|
||||
public ?float $rating
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,4 +58,4 @@ class CreateMangaDirectlyResource
|
||||
#[Assert\Type(type: 'float', message: 'La note doit être un nombre décimal')]
|
||||
#[Assert\Range(min: 0, max: 5, notInRangeMessage: 'La note doit être comprise entre {{ min }} et {{ max }}')]
|
||||
public ?float $rating = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,5 +45,6 @@ class DeleteCbzResource
|
||||
{
|
||||
public function __construct(
|
||||
public string $id
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,5 +45,6 @@ class DeleteChapterResource
|
||||
{
|
||||
public function __construct(
|
||||
public string $id
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,5 +45,6 @@ class DeleteMangaResource
|
||||
{
|
||||
public function __construct(
|
||||
public string $id
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,6 @@ class DownloadCbzResource
|
||||
{
|
||||
public function __construct(
|
||||
public string $id
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,5 +22,6 @@ class DownloadVolumeResource
|
||||
public function __construct(
|
||||
public string $id,
|
||||
public int $volume
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@ class EditMultipleChaptersResource
|
||||
#[Assert\NotBlank(message: 'La liste des chapitres est obligatoire')]
|
||||
#[Assert\Count(min: 1, minMessage: 'Vous devez spécifier au moins un chapitre')]
|
||||
public readonly array $chapters
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
readonly class ChapterEditData
|
||||
@@ -37,5 +38,6 @@ readonly class ChapterEditData
|
||||
public string $id,
|
||||
public ?string $title = null,
|
||||
public ?int $volume = null
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,5 +56,6 @@ class FetchMangaChaptersResource
|
||||
#[Assert\NotBlank(message: 'L\'identifiant du manga est obligatoire')]
|
||||
// #[Assert\Uuid(message: 'L\'identifiant du manga doit être un UUID valide')]
|
||||
public string $mangaId
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,4 +108,3 @@ class FindMangaMatchByFilenameResource
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,5 +22,6 @@ class GetMangaBySlugResource
|
||||
{
|
||||
public function __construct(
|
||||
public string $slug
|
||||
) {}
|
||||
}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,3 @@ class ImportChapterResource
|
||||
|
||||
public ?File $file = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,3 @@ class ImportVolumeResource
|
||||
|
||||
public ?File $file = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,4 +63,4 @@ use App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider\GetMangaChaptersS
|
||||
)]
|
||||
class MangaChaptersResource
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,4 @@ use App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider\GetMangaListState
|
||||
)]
|
||||
class MangaListResource
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,4 +32,4 @@ use App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider\GetMangaStateProv
|
||||
)]
|
||||
class MangaResource
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ readonly class CreateMangaDirectlyProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private CreateMangaHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
@@ -35,4 +36,4 @@ readonly class CreateMangaDirectlyProcessor implements ProcessorInterface
|
||||
|
||||
$this->handler->handle($command);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,8 @@ readonly class CreateMangaProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private CreateMangaFromMangadexHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
@@ -23,4 +24,4 @@ readonly class CreateMangaProcessor implements ProcessorInterface
|
||||
throw new NotFoundHttpException($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ readonly class DeleteCbzProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private DeleteCbzHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
|
||||
@@ -13,7 +13,8 @@ readonly class DeleteChapterProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private DeleteChapterHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
|
||||
@@ -14,7 +14,8 @@ readonly class DeleteMangaProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private DeleteMangaHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): int
|
||||
{
|
||||
|
||||
@@ -14,7 +14,8 @@ readonly class EditMangaProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private EditMangaHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
|
||||
@@ -16,7 +16,8 @@ readonly class EditMultipleChaptersProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private EditMultipleChaptersHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): int
|
||||
{
|
||||
|
||||
@@ -13,7 +13,8 @@ readonly class FetchMangaChaptersProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private MessageBusInterface $messageBus
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
|
||||
@@ -15,7 +15,8 @@ readonly class RefreshMangaChaptersProcessor implements ProcessorInterface
|
||||
public function __construct(
|
||||
private MessageBusInterface $commandBus,
|
||||
private MangaRepositoryInterface $mangaRepository
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
|
||||
@@ -15,7 +15,8 @@ readonly class ToggleMonitoringProcessor implements ProcessorInterface
|
||||
{
|
||||
public function __construct(
|
||||
private ToggleMangaMonitoringHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []): void
|
||||
{
|
||||
|
||||
@@ -14,7 +14,8 @@ readonly class DeleteCbzProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private ChapterRepositoryInterface $chapterRepository
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): DeleteCbzResource
|
||||
{
|
||||
|
||||
@@ -13,7 +13,8 @@ readonly class DeleteChapterProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private ChapterRepositoryInterface $chapterRepository
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): DeleteChapterResource
|
||||
{
|
||||
|
||||
@@ -13,7 +13,8 @@ readonly class DeleteMangaProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private MangaRepositoryInterface $mangaRepository
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): DeleteMangaResource
|
||||
{
|
||||
|
||||
@@ -15,7 +15,8 @@ readonly class DownloadCbzProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private DownloadCbzHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): Response
|
||||
{
|
||||
|
||||
@@ -15,7 +15,8 @@ readonly class DownloadVolumeProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private DownloadVolumeHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): Response
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ readonly class FindMangaMatchByFilenameStateProvider implements ProviderInterfac
|
||||
// Pour Get, on retourne directement la resource
|
||||
return new FindMangaMatchByFilenameResource(
|
||||
matches: array_map(
|
||||
fn($match) => new FilenameMatchItem(
|
||||
fn ($match) => new FilenameMatchItem(
|
||||
id: $match->id,
|
||||
title: $match->title,
|
||||
slug: $match->slug,
|
||||
@@ -48,4 +48,3 @@ readonly class FindMangaMatchByFilenameStateProvider implements ProviderInterfac
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ readonly class GetMangaBySlugStateProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private GetMangaBySlugHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): MangaDetail
|
||||
{
|
||||
|
||||
@@ -14,7 +14,8 @@ readonly class GetMangaChaptersStateProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private GetMangaChaptersHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): ChapterCollection
|
||||
{
|
||||
@@ -56,4 +57,4 @@ readonly class GetMangaChaptersStateProvider implements ProviderInterface
|
||||
createdAt: $chapter->createdAt->format(\DateTimeInterface::RFC3339)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ readonly class GetMangaListStateProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private GetMangaListHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): MangaCollection
|
||||
{
|
||||
|
||||
@@ -12,7 +12,8 @@ readonly class GetMangaStateProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private GetMangaByIdHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): MangaDetail
|
||||
{
|
||||
|
||||
@@ -14,7 +14,8 @@ readonly class SearchLocalMangaStateProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private SearchLocalMangaHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): MangaCollection
|
||||
{
|
||||
|
||||
@@ -13,7 +13,8 @@ readonly class SearchMangaStateProvider implements ProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private SearchMangaHandler $handler
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function provide(Operation $operation, array $uriVariables = [], array $context = []): MangaSearchCollection
|
||||
{
|
||||
@@ -41,4 +42,4 @@ readonly class SearchMangaStateProvider implements ProviderInterface
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user