Fixes the configuration file
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user