mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-07 16:10:15 +02:00
Refactor for code consistency and type safety assertions across repositories and entities
This commit is contained in:
+3
-3
@@ -155,9 +155,9 @@ class Quiz
|
||||
}
|
||||
}
|
||||
|
||||
if ($missing !== [] || $duplicates !== []) {
|
||||
if ([] !== $missing || [] !== $duplicates) {
|
||||
$errors = [];
|
||||
if ($missing !== []) {
|
||||
if ([] !== $missing) {
|
||||
// If all active candidates are missing, show a special message
|
||||
if (\count($missing) === \count($activeCandidates)) {
|
||||
$errors[] = 'No candidates assigned to this question';
|
||||
@@ -166,7 +166,7 @@ class Quiz
|
||||
}
|
||||
}
|
||||
|
||||
if ($duplicates !== []) {
|
||||
if ([] !== $duplicates) {
|
||||
$errors[] = 'Duplicate candidates: '.implode(', ', $duplicates);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user