instances added god may help

This commit is contained in:
2026-02-23 12:58:19 +01:00
parent 25370a1a55
commit 99db252f60
290 changed files with 9858 additions and 4914 deletions

View File

@@ -6,7 +6,7 @@ use MintyPHP\DB;
class RateLimitRepository
{
public static function findByScopeAndHash(string $scope, string $subjectHash): ?array
public function findByScopeAndHash(string $scope, string $subjectHash): ?array
{
$row = DB::selectOne(
'select id, scope, subject_hash, hits, window_started_at, blocked_until, created, modified from request_rate_limits where scope = ? and subject_hash = ? limit 1',
@@ -19,7 +19,7 @@ class RateLimitRepository
return $row['request_rate_limits'];
}
public static function create(
public function create(
string $scope,
string $subjectHash,
int $hits,
@@ -37,7 +37,7 @@ class RateLimitRepository
return $result !== false;
}
public static function updateStateById(
public function updateStateById(
int $id,
int $hits,
string $windowStartedAt,
@@ -57,7 +57,7 @@ class RateLimitRepository
return $result !== false;
}
public static function deleteByScopeAndHash(string $scope, string $subjectHash): bool
public function deleteByScopeAndHash(string $scope, string $subjectHash): bool
{
$result = DB::delete(
'delete from request_rate_limits where scope = ? and subject_hash = ?',