add tests batch 20

This commit is contained in:
root
2026-06-09 01:03:53 -04:00
parent 95efb9652e
commit 6be4875c5e
1502 changed files with 13797 additions and 11313 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ class SchoolIdService
public function assignSchoolIdToUser(int $userId): ?string
{
$user = User::query()->find($userId);
if (! $user) {
if (!$user) {
return null;
}
@@ -36,7 +36,7 @@ class SchoolIdService
->where('school_id', 'like', "STU{$year}%")
->first();
if (! empty($row?->max_id)) {
if (!empty($row?->max_id)) {
$numericPart = substr((string) $row->max_id, 5);
$maxId = (int) $numericPart;
}
@@ -57,7 +57,7 @@ class SchoolIdService
->where('school_id', 'like', "{$year}%")
->first();
if (! empty($row?->max_id)) {
if (!empty($row?->max_id)) {
$numericPart = substr((string) $row->max_id, 2);
$maxId = max($maxId, (int) $numericPart);
}