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
@@ -6,7 +6,9 @@ use App\Models\Incident;
class IncidentHistoryService
{
public function __construct(private IncidentLookupService $lookup) {}
public function __construct(private IncidentLookupService $lookup)
{
}
public function history(?string $schoolYear, ?string $semester): array
{
@@ -33,7 +35,7 @@ class IncidentHistoryService
$updaterIds = [];
foreach ($incidents as $incident) {
foreach (['updated_by_open', 'updated_by_closed', 'updated_by_canceled'] as $key) {
if (! empty($incident[$key])) {
if (!empty($incident[$key])) {
$updaterIds[] = (int) $incident[$key];
}
}
@@ -44,7 +46,7 @@ class IncidentHistoryService
foreach ($incidents as &$incident) {
foreach (['updated_by_open', 'updated_by_closed', 'updated_by_canceled'] as $key) {
$id = (int) ($incident[$key] ?? 0);
$incident[$key.'_name'] = $id > 0 ? ($updaterMap[$id] ?? null) : null;
$incident[$key . '_name'] = $id > 0 ? ($updaterMap[$id] ?? null) : null;
}
$gradeValue = $incident['grade'] ?? '';