private function closeOpenedRound(Game $game) { foreach ($game->getRounds() as $round) { $activity = $this->em->getRepository('MagicWordBundle:Activity')->findOneBy(['player' => $this->currentUser, 'round' => $round]); if ($activity && $activity->getEndDate() == null) { $this->activityManager->endActivity($round); break; } } return; }
private function getNextDisplayOrder(Game $game) { return $game->getRounds()->count(); }