ldc-arcadia-api/src/Application/Security/Exceptions/ClientNameAlreadyExistsException.php
Jérémy Munsch 66fc714ca0
refactor(security): update exception handling to use value objects
Refactor exception handling in ClientNameAlreadyExistsException and ClientNotFoundException
to utilize value objects directly, improving type safety and clarity.
2026-08-20 14:30:09 +02:00

15 lines
377 B
PHP

<?php
declare(strict_types=1);
namespace Application\Security\Exceptions;
use Application\Security\Models\ValueObjects\ClientName;
final class ClientNameAlreadyExistsException extends \DomainException
{
public static function forName(ClientName $name): self
{
return new self("A client with the name '{$name->value}' (or similar) already exists.");
}
}