first commit

This commit is contained in:
2026-03-11 22:04:36 +04:00
commit bae063a4fa
69 changed files with 12411 additions and 0 deletions
@@ -0,0 +1,25 @@
<?php
namespace App\Exceptions;
use RuntimeException;
class DuplicateGameAccountException extends RuntimeException
{
public function __construct(
public readonly string $field,
string $message,
) {
parent::__construct($message);
}
public static function forUsername(): self
{
return new self('username', 'Такой игровой аккаунт уже существует.');
}
public static function forEmail(): self
{
return new self('email', 'На этот email уже зарегистрирован аккаунт.');
}
}