Code Duplication    Length = 4-5 lines in 2 locations

src/eXpansion/Bundle/VoteManager/Plugins/Votes/AbstractVotePlugin.php 2 locations

@@ 134-137 (lines=4) @@
131
        $playerCount = count($this->playerStorage->getOnline());
132
133
        // Check if vote passes when we suppose that all palyers that didn't vote would vote NO.
134
        if ($playerCount > 0 && ($this->currentVote->getYes() / $playerCount) > $this->ratio) {
135
            $this->votePassed();
136
            return;
137
        }
138
139
        // If the vote is still not decided wait for the end to decide.
140
        if (($time - $this->currentVote->getStartTime()) > $this->duration) {
@@ 143-147 (lines=5) @@
140
        if (($time - $this->currentVote->getStartTime()) > $this->duration) {
141
            $totalVotes = $this->currentVote->getYes() + $this->currentVote->getNo() * 1.0;
142
143
            if ($totalVotes >= 1 && ($this->currentVote->getYes() / $totalVotes) > $this->ratio) {
144
                $this->votePassed();
145
            } else {
146
                $this->voteFailed();
147
            }
148
        }
149
    }
150