24 lines
495 B
PHP
24 lines
495 B
PHP
<?php
|
|
|
|
namespace App\Services\School;
|
|
|
|
use App\Models\Configuration;
|
|
|
|
class SemesterSelectionService
|
|
{
|
|
public function selectedTeacherSemester(): string
|
|
{
|
|
$configSemester = trim((string) (Configuration::getConfig('semester') ?? ''));
|
|
if ($configSemester !== '') {
|
|
return $this->normalize($configSemester);
|
|
}
|
|
|
|
return 'Fall';
|
|
}
|
|
|
|
private function normalize(string $value): string
|
|
{
|
|
return ucfirst(strtolower($value));
|
|
}
|
|
}
|