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

@@ -7,7 +7,7 @@ use MintyPHP\Repository\Support\RepoQuery;
class ImportAuditRunRepository
{
public static function createRunning(array $data): int|false
public function createRunning(array $data): int|false
{
$id = DB::insert(
'insert into import_audit_runs (
@@ -25,7 +25,7 @@ class ImportAuditRunRepository
return $id ? (int) $id : false;
}
public static function finishById(int $id, array $data): bool
public function finishById(int $id, array $data): bool
{
if ($id <= 0) {
return false;
@@ -55,7 +55,7 @@ class ImportAuditRunRepository
return (int) $updated > 0;
}
public static function listPaged(array $filters): array
public function listPaged(array $filters): array
{
$search = trim((string) ($filters['search'] ?? ''));
$profileKey = strtolower(trim((string) ($filters['profile_key'] ?? '')));
@@ -157,7 +157,7 @@ class ImportAuditRunRepository
$normalized = [];
if (is_array($rows)) {
foreach ($rows as $row) {
$item = self::normalizeRow($row);
$item = $this->normalizeRow($row);
if ($item !== null) {
$normalized[] = $item;
}
@@ -170,7 +170,7 @@ class ImportAuditRunRepository
];
}
public static function find(int $id): ?array
public function find(int $id): ?array
{
if ($id <= 0) {
return null;
@@ -209,10 +209,10 @@ class ImportAuditRunRepository
(string) $id
);
return self::normalizeRow($row);
return $this->normalizeRow($row);
}
public static function purgeOlderThanDays(int $days): int
public function purgeOlderThanDays(int $days): int
{
if ($days <= 0) {
return 0;
@@ -226,7 +226,7 @@ class ImportAuditRunRepository
return is_int($deleted) ? $deleted : 0;
}
private static function normalizeRow(mixed $row): ?array
private function normalizeRow(mixed $row): ?array
{
if (!is_array($row)) {
return null;