<?php

declare(strict_types=1);

namespace App\Administration\Domain\Exception;

use App\Administration\Domain\Model\PasswordResetToken\PasswordResetTokenId;
use DomainException;

use function sprintf;

final class PasswordResetTokenNotFoundException extends DomainException
{
    public static function withId(PasswordResetTokenId $tokenId): self
    {
        return new self(sprintf(
            'Password reset token with ID "%s" not found.',
            $tokenId,
        ));
    }

    public static function withTokenValue(string $tokenValue): self
    {
        return new self(sprintf(
            'Password reset token with value "%s" not found.',
            $tokenValue,
        ));
    }
}
