style: apply php-cs-fixer formatting (PSR-12)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2026-03-09 20:46:59 +01:00
parent dae215dd3d
commit 7506a7a3c1
234 changed files with 447 additions and 370 deletions

View File

@@ -21,4 +21,4 @@ final readonly class GetChapterPage
{
return $this->pageNumber;
}
}
}

View File

@@ -44,4 +44,4 @@ final readonly class GetChapterPageHandler
$page->getDimensions()
);
}
}
}

View File

@@ -13,8 +13,7 @@ final readonly class ChapterContextResponse
private int $totalPages,
private ?string $previousChapterId,
private ?string $nextChapterId
)
{
) {
}
public function getId(): string

View File

@@ -39,4 +39,4 @@ final readonly class ChapterPageResponse
{
return $this->dimensions;
}
}
}

View File

@@ -55,4 +55,4 @@ final class ChapterPagesResponse
{
return (int) ceil($this->totalItems / $this->itemsPerPage);
}
}
}

View File

@@ -40,4 +40,4 @@ final class PageResponse
{
return $this->dimensions;
}
}
}

View File

@@ -16,14 +16,14 @@ interface ChapterRepositoryInterface
* @return array<Page>
*/
public function getPagesForChapter(ChapterId $chapterId, int $page = 1, int $itemsPerPage = 20): array;
public function getChapterContext(ChapterId $chapterId): ChapterContext;
public function getTotalPagesForChapter(ChapterId $chapterId): int;
public function getPreviousChapterId(ChapterId $chapterId): ?ChapterId;
public function getNextChapterId(ChapterId $chapterId): ?ChapterId;
public function getPageContent(ChapterId $chapterId, PageNumber $pageNumber): PageContent;
}
}

View File

@@ -13,4 +13,4 @@ final class ChapterNotFoundException extends NotFoundHttpException
{
return new self(sprintf('Le chapitre %s n\'existe pas', $chapterId->getValue()));
}
}
}

View File

@@ -14,4 +14,4 @@ final class PageNotFoundException extends NotFoundHttpException
{
return new self(sprintf('La page %d du chapitre %s n\'existe pas', $pageNumber->getValue(), $chapterId->getValue()));
}
}
}

View File

@@ -20,7 +20,8 @@ readonly class ChapterContext
private int $totalPages,
private bool $isVisible,
private \DateTimeImmutable $createdAt
) {}
) {
}
public function getId(): ChapterId
{
@@ -76,4 +77,4 @@ readonly class ChapterContext
{
return $this->createdAt;
}
}
}

View File

@@ -49,4 +49,4 @@ class Page
'height' => $this->height,
];
}
}
}

View File

@@ -45,4 +45,4 @@ final readonly class PageContent
'height' => $this->height,
];
}
}
}

View File

@@ -8,7 +8,8 @@ readonly class ChapterId
{
public function __construct(
private string $value
) {}
) {
}
public function getValue(): string
{
@@ -19,4 +20,4 @@ readonly class ChapterId
{
return $this->value === $other->value;
}
}
}

View File

@@ -15,7 +15,7 @@ final class PageNumber
if ($value < 1) {
throw new InvalidArgumentException('Le numéro de page doit être supérieur à 0');
}
$this->value = $value;
}
@@ -33,4 +33,4 @@ final class PageNumber
{
return (string) $this->value;
}
}
}

View File

@@ -70,4 +70,4 @@ class ChapterPageResource
public function __construct()
{
}
}
}

View File

@@ -10,7 +10,6 @@ use App\Domain\Reader\Application\Query\GetChapterContext;
use App\Domain\Reader\Application\QueryHandler\GetChapterContextHandler;
use App\Domain\Reader\Application\Response\ChapterContextResponse;
final readonly class ChapterContextProvider implements ProviderInterface
{
public function __construct(

View File

@@ -26,4 +26,4 @@ final readonly class ChapterPageProvider implements ProviderInterface
)
);
}
}
}

View File

@@ -20,7 +20,8 @@ readonly class LegacyChapterRepository implements ChapterRepositoryInterface
{
public function __construct(
private EntityManagerInterface $entityManager
) {}
) {
}
public function getPagesForChapter(ChapterId $chapterId, int $page = 1, int $itemsPerPage = 20): array
{