<?php

declare(strict_types=1);

namespace App\Shared\Infrastructure\Tenant;

use RuntimeException;

use function sprintf;

final class TenantNotFoundException extends RuntimeException
{
    public static function withSubdomain(string $subdomain): self
    {
        return new self(sprintf('Tenant with subdomain "%s" not found.', $subdomain));
    }

    public static function withId(TenantId $tenantId): self
    {
        return new self(sprintf('Tenant with ID "%s" not found.', $tenantId));
    }
}
