public function addVote ($vote, $tag = null) : Vote
    {
        $this->prepareVoteInput($vote, $tag);

        // Check Max Vote Count
        if ( self::$_maxVoteNumber !== null && !$this->_ignoreStaticMaxVote && $this->countVotes() >= self::$_maxVoteNumber ) :
            throw new CondorcetException(16, self::$_maxVoteNumber);
        endif;


        // Register vote
        return $this->registerVote($vote, $tag); // Return the vote object
    }
public function addVote ($vote, $tag = null) : Vote
    {
        $this->prepareVoteInput($vote, $tag);

        // Check Max Vote Count
        if ( self::$_maxVoteNumber !== null && !$this->_ignoreStaticMaxVote && $this->countVotes() >= self::$_maxVoteNumber ) :
            throw new CondorcetException(16, self::$_maxVoteNumber);
        endif;


        // Register vote
        return $this->registerVote($vote, $tag); // Return the vote object
    }
public function addVote ( $ vote , $ tag = null ) : Vote { $ this -> prepareVoteInput ( $ vote , $ tag ) ; // Check Max Vote Count if ( self :: $ _maxVoteNumber !== null && ! $ this -> _ignoreStaticMaxVote && $ this -> countVotes ( ) >= self :: $ _maxVoteNumber ) : throw new CondorcetException ( 16 , self :: $ _maxVoteNumber ) ; endif ; // Register vote return $ this -> registerVote ( $ vote , $ tag ) ; // Return the vote object }
Add a single vote. Array key is the rank, each candidate in a rank are separate by ',' It is not necessary to register the last rank.
Add a single vote . Array key is the rank each candidate in a rank are separate by It is not necessary to register the last rank .