<?php

declare(strict_types=1);

namespace App\Administration\Domain\Exception;

use App\Administration\Domain\Model\ActivationToken\ActivationTokenId;
use DomainException;

use function sprintf;

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

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