apply the school year concept
Tests / PHPUnit (push) Failing after 1m19s

This commit is contained in:
root
2026-07-14 00:59:00 -04:00
parent 504c3bc9f9
commit feb1b29a32
73 changed files with 4288 additions and 620 deletions
+9 -4
View File
@@ -24,17 +24,22 @@ final class SchoolYearContext
public function status(): string
{
return $this->status;
return strtolower($this->status);
}
public function isActive(): bool
{
return $this->status === 'active';
return $this->status() === 'active';
}
public function isReadonly(): bool
{
return in_array($this->status, ['closed', 'archived'], true);
return ! $this->isActive();
}
public function isHistorical(): bool
{
return ! $this->isActive();
}
public function isExplicitSelection(): bool
@@ -47,7 +52,7 @@ final class SchoolYearContext
return [
'id' => $this->id,
'name' => $this->yearName,
'status' => $this->status,
'status' => $this->status(),
'readonly' => $this->isReadonly(),
'explicitSelection' => $this->explicitSelection,
];