private function checkRoundEnd() { $time1 = new \DateTime(); $time1->modify('-' . $this->round->getRoundTime() . ' hours'); if ($this->round->getRoundTimeType() == Round::ROUND_TIME_TYPE_LAST_DEPOSIT) { $time2 = $this->round->getStats()->getLastDeposit(); } else { $time2 = $this->round->getStats()->getLastPayout(); } if ($time2 && $time1 > $time2) { $this->writeln('Round finished'); $this->payoutManager->realiseRoundEndPayouts(); $this->roundManager->startNextRound(); } else { $this->writeln('Round not finished'); } }