private function testQSchedule(QMatchPlan $match, DateTime $schedule, DateTime $slotschedule, Timeslot $timeslot) { if ($slotschedule < $schedule) { return false; } /* @var $diff DateInterval */ $diff = $slotschedule->diff($schedule); if ($diff->d * 24 * 60 + $diff->h * 60 + $diff->i < $match->getCategory()->getMatchtime() + $timeslot->getRestperiod()) { return false; } return true; }