<?php

declare(strict_types=1);

namespace App\Domain\Reader\Domain\Exception;

use App\Domain\Reader\Domain\ValueObject\ChapterId;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

final class ChapterNotFoundException extends NotFoundHttpException
{
    public static function forChapter(ChapterId $chapterId): self
    {
        return new self(sprintf('Le chapitre %s n\'existe pas', $chapterId->getValue()));
    }
}
