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
@@ -4,7 +4,6 @@ namespace App\Services\Incidents;
use App\Models\ClassSection;
use App\Models\StudentClass;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Support\Facades\DB;
class IncidentLookupService
@@ -73,7 +72,7 @@ class IncidentLookupService
->select('id', 'firstname', 'lastname')
->whereIn('id', $userIds)
->get()
->map(fn ($row) => $row instanceof Arrayable ? $row->toArray() : (array) $row)
->map(fn ($row) => $row instanceof \Illuminate\Contracts\Support\Arrayable ? $row->toArray() : (array) $row)
->all();
$map = [];
@@ -82,8 +81,8 @@ class IncidentLookupService
if ($id === null) {
continue;
}
$name = trim((string) ($row['firstname'] ?? '').' '.(string) ($row['lastname'] ?? ''));
$map[(int) $id] = $name !== '' ? $name : ('User #'.$id);
$name = trim((string) ($row['firstname'] ?? '') . ' ' . (string) ($row['lastname'] ?? ''));
$map[(int) $id] = $name !== '' ? $name : ('User #' . $id);
}
return $map;