fix gitlab tests

This commit is contained in:
root
2026-06-09 02:32:58 -04:00
parent 20a0b6c4e5
commit 6def9993da
1489 changed files with 10449 additions and 11356 deletions
@@ -44,7 +44,7 @@ class IpBanController extends BaseApiController
public function show(int $id): JsonResponse
{
$ban = $this->queryService->find($id);
if (! $ban) {
if (!$ban) {
return $this->error('IP record not found.', Response::HTTP_NOT_FOUND);
}
@@ -67,12 +67,11 @@ class IpBanController extends BaseApiController
try {
$ban = $this->commandService->banNow($id ? (int) $id : null, $ip ? (string) $ip : null, $hours);
} catch (\Throwable $e) {
Log::error('IP ban failed: '.$e->getMessage());
Log::error('IP ban failed: ' . $e->getMessage());
return $this->error('Unable to ban IP.', Response::HTTP_INTERNAL_SERVER_ERROR);
}
if (! $ban) {
if (!$ban) {
return $this->error('IP record not found.', Response::HTTP_NOT_FOUND);
}
@@ -91,10 +90,9 @@ class IpBanController extends BaseApiController
try {
if ($all) {
$count = $this->commandService->unbanAll();
return $this->success([
'count' => $count,
], $count.' IP(s) unbanned.');
], $count . ' IP(s) unbanned.');
}
$ban = $this->commandService->unbanOne(
@@ -102,12 +100,11 @@ class IpBanController extends BaseApiController
$validated['ip'] ?? null
);
} catch (\Throwable $e) {
Log::error('IP unban failed: '.$e->getMessage());
Log::error('IP unban failed: ' . $e->getMessage());
return $this->error('Unable to unban IP.', Response::HTTP_INTERNAL_SERVER_ERROR);
}
if (! $ban) {
if (!$ban) {
return $this->error('IP record not found.', Response::HTTP_NOT_FOUND);
}