@@ -38,15 +38,15 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | |
| 40 | 40 | $pastGames = $this->getDoctrine() |
| 41 | - ->getRepository(Game::class) |
|
| 42 | - ->findPastGames() |
|
| 41 | + ->getRepository(Game::class) |
|
| 42 | + ->findPastGames() |
|
| 43 | 43 | ; |
| 44 | 44 | |
| 45 | 45 | $user = $this->getUser(); |
| 46 | 46 | |
| 47 | 47 | $userBets = $this->getDoctrine() |
| 48 | - ->getRepository(UserBettingEntity::class) |
|
| 49 | - ->findUserBettingByUserId($user, $pastGames) |
|
| 48 | + ->getRepository(UserBettingEntity::class) |
|
| 49 | + ->findUserBettingByUserId($user, $pastGames) |
|
| 50 | 50 | ; |
| 51 | 51 | |
| 52 | 52 | $pastGamesForm = []; |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | public function index($gameId) |
| 95 | 95 | { |
| 96 | 96 | $game = $this->getDoctrine() |
| 97 | - ->getRepository(Game::class) |
|
| 98 | - ->find($gameId) |
|
| 97 | + ->getRepository(Game::class) |
|
| 98 | + ->find($gameId) |
|
| 99 | 99 | ; |
| 100 | 100 | |
| 101 | 101 | if (!$game) { |
@@ -128,12 +128,12 @@ discard block |
||
| 128 | 128 | $entityManager = $this->getDoctrine()->getManager(); |
| 129 | 129 | |
| 130 | 130 | $userBetting = $entityManager->getRepository(UserBettingEntity::class) |
| 131 | - ->findByGameIdAndUserId($params['gameId'], $this->getUser()->getId()) |
|
| 131 | + ->findByGameIdAndUserId($params['gameId'], $this->getUser()->getId()) |
|
| 132 | 132 | ; |
| 133 | 133 | if (!$userBetting instanceof UserBettingEntity) { |
| 134 | 134 | $userBetting = new UserBettingEntity(); |
| 135 | 135 | $game = $entityManager->getRepository(Game::class) |
| 136 | - ->find($params['gameId']); |
|
| 136 | + ->find($params['gameId']); |
|
| 137 | 137 | $userBetting->setGame($game); |
| 138 | 138 | $userBetting->setUser($this->getUser()); |
| 139 | 139 | } |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | $userBetting->setFirstTeamResult($params['firstTeamResult']); |
| 142 | 142 | $userBetting->setSecondTeamResult($params['secondTeamResult']); |
| 143 | 143 | |
| 144 | - if($userBetting->getGame()->getDate()->getTimestamp() < time() ) { |
|
| 144 | + if ($userBetting->getGame()->getDate()->getTimestamp() < time()) { |
|
| 145 | 145 | return $this->json(['status' => false]); |
| 146 | 146 | } |
| 147 | 147 | |