@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | * candidate votes) |
121 | 121 | * @return Ballot The same ballot passed in modified |
122 | 122 | */ |
123 | - protected function allocateVotes(Ballot &$ballot, float $multiplier = 1.0, float $divisor = 1.0): Ballot |
|
123 | + protected function allocateVotes(Ballot & $ballot, float $multiplier = 1.0, float $divisor = 1.0): Ballot |
|
124 | 124 | { |
125 | 125 | $weight = $ballot->setWeight(($ballot->getWeight() * $multiplier) / $divisor); |
126 | 126 | $candidate = $ballot->getNextChoice(); |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * @param Ballot &$Ballot Ballot to test |
266 | 266 | * @return bool True if valid, false if invalid |
267 | 267 | */ |
268 | - private function checkBallotValidity(Ballot &$Ballot): bool |
|
268 | + private function checkBallotValidity(Ballot & $Ballot): bool |
|
269 | 269 | { |
270 | 270 | if (count($ballot->getRanking()) > $this->election->getCandidateCount()) |
271 | 271 | { |
@@ -224,8 +224,7 @@ discard block |
||
224 | 224 | $minimum = $candidate->getVotes(); |
225 | 225 | unset($minimumCandidates); |
226 | 226 | $minimumCandidates[] = $candidate; |
227 | - } |
|
228 | - elseif ($candidate->getVotes() == $minimum) |
|
227 | + } elseif ($candidate->getVotes() == $minimum) |
|
229 | 228 | { |
230 | 229 | $minimumCandidates[] = $candidate; |
231 | 230 | } |
@@ -270,8 +269,7 @@ discard block |
||
270 | 269 | if (count($ballot->getRanking()) > $this->election->getCandidateCount()) |
271 | 270 | { |
272 | 271 | return false; |
273 | - } |
|
274 | - else |
|
272 | + } else |
|
275 | 273 | { |
276 | 274 | $candidateIds = $this->election->getCandidateIds(); |
277 | 275 |