Fixes the configuration file

This commit is contained in:
2026-03-16 14:34:07 +01:00
parent ede31b15cb
commit 29a94899da
16 changed files with 559 additions and 18 deletions

View File

@@ -103,15 +103,17 @@ private function calculateAndUpdateScore(Screening $screening, array $answers):
}
/**
* Calculate the total score from the answers.
* Calculate the total score from the answers yes = 1, unknown = 0.5, no = 0.
*/
private function calculateScore(array $answers): int
private function calculateScore(array $answers): float
{
$score = 0;
foreach ($answers as $value) {
if ($value === 'yes') {
$score++;
} elseif ($value === 'unknown') {
$score += 0.5;
}
}