add test batches
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user