Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-09 00:03:03 -04:00
parent 8d4d610b82
commit b5fd4a4ca1
1414 changed files with 11317 additions and 10201 deletions
@@ -5,6 +5,7 @@ namespace App\Services\Promotions;
use App\Models\ClassSection;
use App\Models\LevelProgression;
use App\Models\SchoolClass;
use App\Services\School\AccountEventService;
use Illuminate\Support\Collection;
/**
@@ -12,7 +13,7 @@ use Illuminate\Support\Collection;
* `level_progressions` table (plan section 10).
*
* Falls back to `class_id + 1` only if no mapping is found, matching
* the legacy behaviour in {@see \App\Services\School\AccountEventService}.
* the legacy behaviour in {@see AccountEventService}.
*/
class LevelProgressionService
{
@@ -23,15 +24,15 @@ class LevelProgressionService
public const DEFAULT_MAP = [
['current' => 'KG1', 'next' => 'KG2', 'order' => 10, 'terminal' => false],
['current' => 'KG2', 'next' => 'Grade 1', 'order' => 20, 'terminal' => false],
['current' => 'Grade 1','next' => 'Grade 2', 'order' => 30, 'terminal' => false],
['current' => 'Grade 2','next' => 'Grade 3', 'order' => 40, 'terminal' => false],
['current' => 'Grade 3','next' => 'Grade 4', 'order' => 50, 'terminal' => false],
['current' => 'Grade 4','next' => 'Grade 5', 'order' => 60, 'terminal' => false],
['current' => 'Grade 5','next' => 'Grade 6', 'order' => 70, 'terminal' => false],
['current' => 'Grade 6','next' => 'Grade 7', 'order' => 80, 'terminal' => false],
['current' => 'Grade 7','next' => 'Grade 8', 'order' => 90, 'terminal' => false],
['current' => 'Grade 8','next' => 'Grade 9', 'order' => 100, 'terminal' => false],
['current' => 'Grade 9','next' => 'Youth', 'order' => 110, 'terminal' => false],
['current' => 'Grade 1', 'next' => 'Grade 2', 'order' => 30, 'terminal' => false],
['current' => 'Grade 2', 'next' => 'Grade 3', 'order' => 40, 'terminal' => false],
['current' => 'Grade 3', 'next' => 'Grade 4', 'order' => 50, 'terminal' => false],
['current' => 'Grade 4', 'next' => 'Grade 5', 'order' => 60, 'terminal' => false],
['current' => 'Grade 5', 'next' => 'Grade 6', 'order' => 70, 'terminal' => false],
['current' => 'Grade 6', 'next' => 'Grade 7', 'order' => 80, 'terminal' => false],
['current' => 'Grade 7', 'next' => 'Grade 8', 'order' => 90, 'terminal' => false],
['current' => 'Grade 8', 'next' => 'Grade 9', 'order' => 100, 'terminal' => false],
['current' => 'Grade 9', 'next' => 'Youth', 'order' => 110, 'terminal' => false],
['current' => 'Youth', 'next' => null, 'order' => 120, 'terminal' => true],
];
@@ -77,7 +78,7 @@ class LevelProgressionService
}
$current = SchoolClass::query()->find($currentClassId);
if (!$current) {
if (! $current) {
return null;
}
$currentName = (string) ($current->class_name ?? '');
@@ -118,9 +119,10 @@ class LevelProgressionService
return null;
}
$classId = ClassSection::getClassId($classSectionId);
if (!$classId) {
if (! $classId) {
return null;
}
return $this->resolveByCurrentClassId((int) $classId);
}
@@ -181,6 +183,7 @@ class LevelProgressionService
if ($existing) {
$existing->fill($data);
$existing->save();
return $existing;
}