public function onVoteCancelled(Player $player, $cmdName, $cmdValue)
    {

        if ($cmdValue instanceof Vote) {
            $this->voteWidgetFactory->destroy($this->players);
            $this->updateVoteWidgetFactory->destroy($this->players);
        } else {
            $this->voteService->cancel();
        }
    }
public function onVoteCancelled(Player $player, $cmdName, $cmdValue)
    {

        if ($cmdValue instanceof Vote) {
            $this->voteWidgetFactory->destroy($this->players);
            $this->updateVoteWidgetFactory->destroy($this->players);
        } else {
            $this->voteService->cancel();
        }
    }
public function onVoteCancelled ( Player $ player , $ cmdName , $ cmdValue ) { if ( $ cmdValue instanceof Vote ) { $ this -> voteWidgetFactory -> destroy ( $ this -> players ) ; $ this -> updateVoteWidgetFactory -> destroy ( $ this -> players ) ; } else { $ this -> voteService -> cancel ( ) ; } }
When vote gets cancelled

@param Player $player
@param string $cmdName
@param string $cmdValue

@return void
When vote gets cancelled