update project
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\SchoolCore\Academics\Policies;
|
||||
|
||||
use App\Domain\SchoolCore\Context\SchoolContext;
|
||||
use App\Domain\SchoolCore\Contracts\GradeScalePolicyContract;
|
||||
|
||||
final class DefaultGradeScalePolicy implements GradeScalePolicyContract
|
||||
{
|
||||
public function gradeForScore(SchoolContext $context, float $score): string
|
||||
{
|
||||
return match (true) { $score >= 90 => 'A', $score >= 80 => 'B', $score >= 70 => 'C', $score >= 60 => 'D', default => 'F' };
|
||||
}
|
||||
public function passingScore(SchoolContext $context): float { return 60.0; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Domain\SchoolCore\Academics\Policies;
|
||||
|
||||
use App\Domain\SchoolCore\Context\SchoolContext;
|
||||
use App\Domain\SchoolCore\Contracts\PromotionPolicyContract;
|
||||
|
||||
final class DefaultPromotionPolicy implements PromotionPolicyContract
|
||||
{
|
||||
public function canPromote(SchoolContext $context, int $studentId): bool { return false; }
|
||||
public function nextPlacement(SchoolContext $context, int $studentId): array { return []; }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Academics
|
||||
|
||||
Neutral SchoolCore module boundary. Keep domain-specific vocabulary in extension modules.
|
||||
Reference in New Issue
Block a user