This commit is contained in:
2025-04-22 23:42:07 +02:00
parent 7b05e52d95
commit 0f07e7eabf
15 changed files with 51 additions and 43 deletions

View File

@@ -103,7 +103,7 @@ class Question
return 'This question has no answers';
}
$correctAnswers = $this->answers->filter(static fn (Answer $answer): ?bool => $answer->isRightAnswer())->count();
$correctAnswers = $this->answers->filter(static fn (Answer $answer): bool => $answer->isRightAnswer())->count();
if (0 === $correctAnswers) {
return 'This question has no correct answers';