fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -50,7 +50,7 @@ class AuthController extends BaseApiController
}
$user = User::query()->whereRaw('LOWER(email) = ?', [$email])->first();
if (!$user) {
if (! $user) {
$security->logIpAttempt((string) $ip);
Log::notice('api_login: unknown email', [
'ip' => (string) $ip,
@@ -111,7 +111,7 @@ class AuthController extends BaseApiController
$security->logSuccessfulLogin($user->fresh(), $request);
$fresh = $user->fresh();
if (!$fresh) {
if (! $fresh) {
Log::warning('api_login: fresh user reload failed after successful verification', [
'ip' => (string) $ip,
'email' => $this->maskEmail($email),
@@ -139,7 +139,7 @@ class AuthController extends BaseApiController
[$local, $domain] = explode('@', $email, 2);
$localPrefix = substr($local, 0, min(2, strlen($local)));
return $localPrefix . str_repeat('*', max(strlen($local) - strlen($localPrefix), 0)) . '@' . $domain;
return $localPrefix.str_repeat('*', max(strlen($local) - strlen($localPrefix), 0)).'@'.$domain;
}
public function refresh(Request $request): JsonResponse
@@ -160,7 +160,7 @@ class AuthController extends BaseApiController
public function me(): JsonResponse
{
$user = Auth::user();
if (!$user) {
if (! $user) {
return $this->respondError('Unauthorized.', 401);
}