public function onEndMapEnd($count, $time, $restarted, Map $map)
    {

        if (!empty($this->changedVotes)) {
            $votes = [];
            foreach ($this->changedVotes as $vote) {
                $votes[] = $vote;
            }

            $this->mxKarma->saveVotes($map, (time() - $this->startTime), $votes);
        }
    }
public function onEndMapEnd($count, $time, $restarted, Map $map)
    {

        if (!empty($this->changedVotes)) {
            $votes = [];
            foreach ($this->changedVotes as $vote) {
                $votes[] = $vote;
            }

            $this->mxKarma->saveVotes($map, (time() - $this->startTime), $votes);
        }
    }
public function onEndMapEnd ( $ count , $ time , $ restarted , Map $ map ) { if ( ! empty ( $ this -> changedVotes ) ) { $ votes = [ ] ; foreach ( $ this -> changedVotes as $ vote ) { $ votes [ ] = $ vote ; } $ this -> mxKarma -> saveVotes ( $ map , ( time ( ) - $ this -> startTime ) , $ votes ) ; } }
Callback sent when the "EndMap" section end.

@param int     $count Each time this section is played, this number is incremented by one
@param int     $time Server time when the callback was sent
@param boolean $restarted true if the map was restarted, false otherwise
@param Map     $map Map started with.

@return void
Callback sent when the EndMap section end .