@@ -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); |
@@ -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 |
@@ -124,10 +124,10 @@ discard block |
||
| 124 | 124 | if (!$form->isSubmitted() && !$form->isValid()) { |
| 125 | 125 | return $this->json(['status' => false]); |
| 126 | 126 | } |
| 127 | - if(!isset($params['firstTeamResult']) || $params['firstTeamResult'] < 0) { |
|
| 127 | + if (!isset($params['firstTeamResult']) || $params['firstTeamResult'] < 0) { |
|
| 128 | 128 | return $this->json(['status' => false]); |
| 129 | 129 | } |
| 130 | - if(!isset($params['secondTeamResult']) || $params['secondTeamResult'] < 0) { |
|
| 130 | + if (!isset($params['secondTeamResult']) || $params['secondTeamResult'] < 0) { |
|
| 131 | 131 | return $this->json(['status' => false]); |
| 132 | 132 | } |
| 133 | 133 | |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $userBetting->setFirstTeamResult($params['firstTeamResult']); |
| 150 | 150 | $userBetting->setSecondTeamResult($params['secondTeamResult']); |
| 151 | 151 | |
| 152 | - if($userBetting->getGame()->getDate()->getTimestamp() < time() ) { |
|
| 152 | + if ($userBetting->getGame()->getDate()->getTimestamp() < time()) { |
|
| 153 | 153 | return $this->json(['status' => false]); |
| 154 | 154 | } |
| 155 | 155 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | $forms[1] = $this->createForm(UserExtraBettingType::class, $bet, |
| 33 | 33 | ['teams' => $teams, 'extrabet' => $bets[1] ?? null, 'label' => 'Tipp 1', 'type' => 1] |
| 34 | 34 | )->createView(); |
| 35 | - $forms[2] = $this->createForm(UserExtraBettingType::class, $bet, |
|
| 35 | + $forms[2] = $this->createForm(UserExtraBettingType::class, $bet, |
|
| 36 | 36 | ['teams' => $teams, 'extrabet' => $bets[2] ?? null, 'label' => 'Tipp 2', 'type' => 2] |
| 37 | 37 | )->createView(); |
| 38 | 38 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function sortUserByScore(array $usersScores): array |
| 18 | 18 | { |
| 19 | - usort($usersScores, function ($a, $b) { |
|
| 19 | + usort($usersScores, function($a, $b) { |
|
| 20 | 20 | return ($a->getScoreSumme() <=> $b->getScoreSumme()) * -1; |
| 21 | 21 | }); |
| 22 | 22 | |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | Config::NO_WIN_TEAM => true, |
| 95 | 95 | ]; |
| 96 | 96 | if (!isset($allowedPoints[$point])) { |
| 97 | - throw new \RuntimeException('Point: ' . $point . ' is not allowed'); |
|
| 97 | + throw new \RuntimeException('Point: '.$point.' is not allowed'); |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | \ No newline at end of file |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $this->checkCollection(); |
| 32 | 32 | |
| 33 | - usort($this->collections, function ($a, $b) { |
|
| 33 | + usort($this->collections, function($a, $b) { |
|
| 34 | 34 | return $a->getScore() <=> $b->getScore(); |
| 35 | 35 | }); |
| 36 | 36 | $this->collections = array_reverse($this->collections); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | foreach ($this->collections as $collection) { |
| 52 | 52 | if (!$collection instanceof ScoreInterface) { |
| 53 | - throw new \RuntimeException('Collection: ' . get_class($collection) . 'is not instanceof ' . ScoreInterface::class); |
|
| 53 | + throw new \RuntimeException('Collection: '.get_class($collection).'is not instanceof '.ScoreInterface::class); |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $topTree = []; |
| 67 | 67 | |
| 68 | 68 | for ($i = 0; $i < 3; $i++) { |
| 69 | - if(isset($userScoreWithPositions[$i])) { |
|
| 69 | + if (isset($userScoreWithPositions[$i])) { |
|
| 70 | 70 | $topTree[] = $userScoreWithPositions[$i]; |
| 71 | 71 | } |
| 72 | 72 | } |