public function getVotesCount()
    {
        $votes = 0;
        foreach ($this->answers as $answer) {
            $votes += $answer->votes;
        }
        return $votes;
    }
public function getVotesCount()
    {
        $votes = 0;
        foreach ($this->answers as $answer) {
            $votes += $answer->votes;
        }
        return $votes;
    }
public function getVotesCount ( ) { $ votes = 0 ; foreach ( $ this -> answers as $ answer ) { $ votes += $ answer -> votes ; } return $ votes ; }
Returns number of casted votes.
@return int
Returns number of casted votes .