public function onVoteNew(Player $player, $cmdName, $cmdValue)
    {
        if ($cmdValue instanceof Vote) {
            $this->updateVoteWidgetFactory->create($this->players);
            $this->voteWidgetFactory->create($this->players);
        } else {
            $this->voteService->startVote($player, $cmdName, ['value' => $cmdValue]);
        }
    }
public function onVoteNew(Player $player, $cmdName, $cmdValue)
    {
        if ($cmdValue instanceof Vote) {
            $this->updateVoteWidgetFactory->create($this->players);
            $this->voteWidgetFactory->create($this->players);
        } else {
            $this->voteService->startVote($player, $cmdName, ['value' => $cmdValue]);
        }
    }
public function onVoteNew ( Player $ player , $ cmdName , $ cmdValue ) { if ( $ cmdValue instanceof Vote ) { $ this -> updateVoteWidgetFactory -> create ( $ this -> players ) ; $ this -> voteWidgetFactory -> create ( $ this -> players ) ; } else { $ this -> voteService -> startVote ( $ player , $ cmdName , [ 'value' => $ cmdValue ] ) ; } }
When a new vote is addressed

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

@return void
When a new vote is addressed