src/STV/ElectionRunner.php
protected function checkCandidateCountValidity(array $ranking): bool
    {
        if (count($ranking) > $this->election->getCandidateCount()) {
            $this->logger->debug('Invalid ballot - number of candidates');

            return false;
        }

        return true;
    }
protected function checkCandidateCountValidity(array $ranking): bool
    {
        if (count($ranking) > $this->election->getCandidateCount()) {
            $this->logger->debug('Invalid ballot - number of candidates');

            return false;
        }

        return true;
    }
protected function checkCandidateCountValidity ( array $ ranking ) : bool { if ( count ( $ ranking ) > $ this -> election -> getCandidateCount ( ) ) { $ this -> logger -> debug ( 'Invalid ballot - number of candidates' ) ; return false ; } return true ; }
Check that a ballot's ranking doesn't have more elements than
we have candidates

@param  array  $ranking Ballot ranking

@return bool   False if invalid, True if valid
Check that a ballot s ranking doesn t have more elements than we have candidates