2026-08-18 17:31:29 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Application\Security\Exceptions;
|
|
|
|
|
|
2026-08-20 14:30:09 +02:00
|
|
|
use Application\Security\Models\ValueObjects\ClientName;
|
|
|
|
|
|
2026-08-18 17:31:29 +02:00
|
|
|
final class ClientNameAlreadyExistsException extends \DomainException
|
|
|
|
|
{
|
2026-08-20 14:30:09 +02:00
|
|
|
public static function forName(ClientName $name): self
|
2026-08-18 17:31:29 +02:00
|
|
|
{
|
2026-08-20 14:30:09 +02:00
|
|
|
return new self("A client with the name '{$name->value}' (or similar) already exists.");
|
2026-08-18 17:31:29 +02:00
|
|
|
}
|
|
|
|
|
}
|