@@ -16,7 +16,7 @@ |
||
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | $env = $_SERVER['APP_ENV'] ?? 'dev'; |
| 19 | -$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)); |
|
| 19 | +$debug = (bool)($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)); |
|
| 20 | 20 | |
| 21 | 21 | if ($debug) { |
| 22 | 22 | umask(0000); |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | { |
| 76 | 76 | $result = []; |
| 77 | 77 | $teams = $this->getDoctrine()->getRepository(Team::class) |
| 78 | - ->findAll(); |
|
| 78 | + ->findAll(); |
|
| 79 | 79 | |
| 80 | 80 | foreach ($teams as $team) { |
| 81 | 81 | $result[$team->getName()] = $team->getId(); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $qb = $this->createQueryBuilder('game'); |
| 26 | 26 | $qb->where('game.date > :date') |
| 27 | - ->setParameter('date', new \DateTime()) |
|
| 27 | + ->setParameter('date', new \DateTime()) |
|
| 28 | 28 | ->orderBy('game.date', 'ASC'); |
| 29 | 29 | |
| 30 | 30 | return $qb->getQuery()->getResult(); |
@@ -37,9 +37,9 @@ |
||
| 37 | 37 | public function configureOptions(OptionsResolver $resolver) |
| 38 | 38 | { |
| 39 | 39 | $resolver->setDefaults(array( |
| 40 | - 'game' => null, |
|
| 41 | - 'bet' => null, |
|
| 42 | - 'editable' => null |
|
| 40 | + 'game' => null, |
|
| 41 | + 'bet' => null, |
|
| 42 | + 'editable' => null |
|
| 43 | 43 | )); |
| 44 | 44 | } |
| 45 | 45 | |
@@ -29,15 +29,15 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | $pastGames = $this->getDoctrine() |
| 32 | - ->getRepository(Game::class) |
|
| 33 | - ->findPastGames() |
|
| 32 | + ->getRepository(Game::class) |
|
| 33 | + ->findPastGames() |
|
| 34 | 34 | ; |
| 35 | 35 | |
| 36 | 36 | $user = $this->getUser(); |
| 37 | 37 | |
| 38 | 38 | $userBets = $this->getDoctrine() |
| 39 | - ->getRepository(UserBettingEntity::class) |
|
| 40 | - ->findUserBettingByUserId($user, $pastGames) |
|
| 39 | + ->getRepository(UserBettingEntity::class) |
|
| 40 | + ->findUserBettingByUserId($user, $pastGames) |
|
| 41 | 41 | ; |
| 42 | 42 | |
| 43 | 43 | $pastGamesForm = []; |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | public function index($gameId) |
| 86 | 86 | { |
| 87 | 87 | $game = $this->getDoctrine() |
| 88 | - ->getRepository(Game::class) |
|
| 89 | - ->find($gameId) |
|
| 88 | + ->getRepository(Game::class) |
|
| 89 | + ->find($gameId) |
|
| 90 | 90 | ; |
| 91 | 91 | |
| 92 | 92 | if (!$game) { |
@@ -117,12 +117,12 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | $entityManager = $this->getDoctrine()->getManager(); |
| 119 | 119 | $userBetting = $entityManager->getRepository(UserBettingEntity::class) |
| 120 | - ->findByGameIdAndUserId($params['gameId'], $this->getUser()->getId()) |
|
| 120 | + ->findByGameIdAndUserId($params['gameId'], $this->getUser()->getId()) |
|
| 121 | 121 | ; |
| 122 | 122 | if (!$userBetting instanceof UserBettingEntity) { |
| 123 | 123 | $userBetting = new UserBettingEntity(); |
| 124 | 124 | $game = $entityManager->getRepository(Game::class) |
| 125 | - ->find($params['gameId']); |
|
| 125 | + ->find($params['gameId']); |
|
| 126 | 126 | $userBetting->setGame($game); |
| 127 | 127 | $userBetting->setUser($this->getUser()); |
| 128 | 128 | } |
@@ -141,8 +141,8 @@ discard block |
||
| 141 | 141 | $user = $this->getUser(); |
| 142 | 142 | |
| 143 | 143 | $userBets = $this->getDoctrine() |
| 144 | - ->getRepository(UserBettingEntity::class) |
|
| 145 | - ->findUserBettingByUserId($user, $games) |
|
| 144 | + ->getRepository(UserBettingEntity::class) |
|
| 145 | + ->findUserBettingByUserId($user, $games) |
|
| 146 | 146 | ; |
| 147 | 147 | |
| 148 | 148 | /** @var UserBettingEntity[] $gameId2UserBets */ |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | public function findUserBettingByUserId(User $user, array $games) |
| 24 | 24 | { |
| 25 | 25 | $gameIds = array_map( |
| 26 | - function ($game) { |
|
| 26 | + function($game) { |
|
| 27 | 27 | return $game->getId(); |
| 28 | 28 | }, |
| 29 | 29 | $games |
@@ -113,7 +113,6 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Gets triggered only on insert |
| 116 | - |
|
| 117 | 116 | * @ORM\PrePersist |
| 118 | 117 | */ |
| 119 | 118 | public function onPrePersist() |
@@ -123,7 +122,6 @@ discard block |
||
| 123 | 122 | |
| 124 | 123 | /** |
| 125 | 124 | * Gets triggered every time on update |
| 126 | - |
|
| 127 | 125 | * @ORM\PreUpdate |
| 128 | 126 | */ |
| 129 | 127 | public function onPreUpdate() |