53fb7b7760
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
22 lines
562 B
PHP
22 lines
562 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\Auth;
|
|
|
|
use RuntimeException;
|
|
|
|
/**
|
|
* Доменная ошибка самозаписи. reason — машинный код для ответа контроллера:
|
|
* email_taken | captcha_failed | not_found | expired | too_many_attempts | invalid_code.
|
|
*/
|
|
final class RegistrationException extends RuntimeException
|
|
{
|
|
public function __construct(
|
|
public readonly string $reason,
|
|
public readonly ?int $attemptsRemaining = null,
|
|
) {
|
|
parent::__construct($reason);
|
|
}
|
|
}
|