Skip to content

Commit 111e937

Browse files
committed
fix: update CompleteRanking constraint to use countCandidates property for vote validation
1 parent 00b1d17 commit 111e937

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/Constraints/CompleteRanking.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ class CompleteRanking implements VoteConstraintInterface
2525
{
2626
public static function isVoteAllowed(Election $election, Vote $vote): bool
2727
{
28-
return \count($vote->getAllCandidates()) === $election->countCandidates();
28+
return $vote->countCandidates === $election->countCandidates();
2929
}
3030
}

0 commit comments

Comments
 (0)