|
@@ -120,7 +120,7 @@ discard block |
|
|
block discarded – undo |
|
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(); |
|
@@ -281,7 +281,7 @@ discard block |
|
|
block discarded – undo |
|
281
|
281
|
* @param Ballot &$Ballot Ballot to test |
|
282
|
282
|
* @return bool True if valid, false if invalid |
|
283
|
283
|
*/ |
|
284
|
|
- private function checkBallotValidity(Ballot &$ballot): bool |
|
|
284
|
+ private function checkBallotValidity(Ballot & $ballot): bool |
|
285
|
285
|
{ |
|
286
|
286
|
if (count($ballot->getRanking()) > $this->election->getCandidateCount()) |
|
287
|
287
|
{ |
Please login to merge, or discard this patch.