src/STV/ElectionRunner.php
protected function electCandidates(array $candidates)
    {
        if ($this->candidatesToElect < count($candidates)) {
            throw new RuntimeException('Cannot elect candidate as not enough seats to fill');
        }

        foreach ($candidates as $i => $candidate) {
            $this->electCandidate($candidate);
        }

        return;
    }
protected function electCandidates(array $candidates)
    {
        if ($this->candidatesToElect < count($candidates)) {
            throw new RuntimeException('Cannot elect candidate as not enough seats to fill');
        }

        foreach ($candidates as $i => $candidate) {
            $this->electCandidate($candidate);
        }

        return;
    }
protected function electCandidates ( array $ candidates ) { if ( $ this -> candidatesToElect < count ( $ candidates ) ) { throw new RuntimeException ( 'Cannot elect candidate as not enough seats to fill' ) ; } foreach ( $ candidates as $ i => $ candidate ) { $ this -> electCandidate ( $ candidate ) ; } return ; }
Elect an array of candidates.

@param Candidate[] $candidates Array of candidates to elect

@return
Elect an array of candidates .