fix tests

This commit is contained in:
root
2026-06-11 11:46:12 -04:00
parent c91fa2ce4d
commit 5ead80fdc7
1489 changed files with 11349 additions and 10305 deletions
@@ -4,13 +4,12 @@ namespace App\Services\Invoices;
class InvoiceGradeService
{
public function __construct(private int $gradeFee)
{
}
public function __construct(private int $gradeFee) {}
public function isKindergarten(string $grade): bool
{
$g = strtolower(trim($grade));
return in_array($g, ['KG', 'kg', 'k', 'kindergarten', 'k-g', 'k.g', 'k g'], true);
}
@@ -29,6 +28,7 @@ class InvoiceGradeService
public function gradeLevelInt(string $grade): int
{
$gl = $this->getGradeLevel($grade);
return (int) ($gl['level'] ?? 0);
}
@@ -39,10 +39,11 @@ class InvoiceGradeService
if ($num === 13) {
return ['level' => 1, 'suffix' => '', 'classId' => 13];
}
return ['level' => $num, 'suffix' => '', 'classId' => null];
}
if (!is_string($grade)) {
if (! is_string($grade)) {
return ['level' => 999, 'suffix' => '', 'classId' => null];
}
@@ -63,6 +64,7 @@ class InvoiceGradeService
if (preg_match('/^Y(?:OUTH)?(?:\s*(\d+))?$/', $g, $m)) {
$n = isset($m[1]) && $m[1] !== '' ? max(1, (int) $m[1]) : 1;
return [
'level' => $this->gradeFee + $n,
'suffix' => '',