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
@@ -21,4 +21,4 @@ final readonly class GetChapterPage
|
||||
{
|
||||
return $this->pageNumber;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,4 +44,4 @@ final readonly class GetChapterPageHandler
|
||||
$page->getDimensions()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,7 @@ final readonly class ChapterContextResponse
|
||||
private int $totalPages,
|
||||
private ?string $previousChapterId,
|
||||
private ?string $nextChapterId
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
|
||||
@@ -39,4 +39,4 @@ final readonly class ChapterPageResponse
|
||||
{
|
||||
return $this->dimensions;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,4 +55,4 @@ final class ChapterPagesResponse
|
||||
{
|
||||
return (int) ceil($this->totalItems / $this->itemsPerPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,4 +40,4 @@ final class PageResponse
|
||||
{
|
||||
return $this->dimensions;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,4 @@ final class ChapterNotFoundException extends NotFoundHttpException
|
||||
{
|
||||
return new self(sprintf('Le chapitre %s n\'existe pas', $chapterId->getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,4 +49,4 @@ class Page
|
||||
'height' => $this->height,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,4 @@ final readonly class PageContent
|
||||
'height' => $this->height,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,4 +70,4 @@ class ChapterPageResource
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -26,4 +26,4 @@ final readonly class ChapterPageProvider implements ProviderInterface
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user