<?php

declare(strict_types=1);

namespace App\Scolarite\Domain\Exception;

use App\Scolarite\Domain\Model\TeacherReplacement\TeacherReplacementId;
use DomainException;

use function sprintf;

final class RemplacementDejaTermineException extends DomainException
{
    public static function withId(TeacherReplacementId $id): self
    {
        return new self(sprintf(
            'Le remplacement "%s" est déjà terminé.',
            $id,
        ));
    }
}
