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
@@ -4,12 +4,13 @@ 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);
}
@@ -28,7 +29,6 @@ class InvoiceGradeService
public function gradeLevelInt(string $grade): int
{
$gl = $this->getGradeLevel($grade);
return (int) ($gl['level'] ?? 0);
}
@@ -39,11 +39,10 @@ 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];
}
@@ -64,7 +63,6 @@ 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' => '',