@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $query->setParameter('rank', $i); |
| 112 | 112 | $row = $query->getOneOrNullResult(); |
| 113 | 113 | if ($row) { |
| 114 | - $data["gameRank$i"] = $row['nb']; |
|
| 114 | + $data["gamerank$i"] = $row['nb']; |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | |
| 76 | 76 | private function getChartsToUpdate() |
| 77 | 77 | { |
| 78 | - $query = $this->em->createQueryBuilder() |
|
| 78 | + $query = $this->em->createQueryBuilder() |
|
| 79 | 79 | ->select('ch') |
| 80 | 80 | ->from('VideoGamesRecords\CoreBundle\Entity\Chart', 'ch') |
| 81 | 81 | ->join('ch.group', 'gr') |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $chart = $this->em->getRepository('VideoGamesRecords\CoreBundle\Entity\Chart')->find($mixed); |
| 26 | 26 | if (null === $chart) { |
| 27 | - return ; |
|
| 27 | + return; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $this->groups[$chart->getGroup()->getId()] = $chart->getGroup(); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | $query->setParameter('rank', $i); |
| 72 | 72 | $result = $query->getResult(); |
| 73 | 73 | foreach ($result as $row) { |
| 74 | - $data["chartRank$i"][$row['id']] = $row['nb']; |
|
| 74 | + $data["chartrank$i"][$row['id']] = $row['nb']; |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * @param array $options |
| 10 | 10 | * @return array |
| 11 | 11 | */ |
| 12 | - public function getRanking(int $id = null, array $options = []): array |
|
| 12 | + public function getRanking(int $id = null, array $options = []): array |
|
| 13 | 13 | { |
| 14 | 14 | $country = $this->em->getRepository('VideoGamesRecords\CoreBundle\Entity\Country')->find($id); |
| 15 | 15 | if (null === $country) { |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | { |
| 77 | 77 | $maxRank = $options['maxRank'] ?? null; |
| 78 | 78 | $player = $this->getPlayer(); |
| 79 | - $team = !empty($options['idTeam'])? $this->em->getReference('VideoGamesRecords\CoreBundle\Entity\Team', $options['idTeam']) : null; |
|
| 79 | + $team = !empty($options['idTeam']) ? $this->em->getReference('VideoGamesRecords\CoreBundle\Entity\Team', $options['idTeam']) : null; |
|
| 80 | 80 | |
| 81 | 81 | $query = $this->em->createQueryBuilder() |
| 82 | 82 | ->select('p') |
@@ -40,9 +40,9 @@ |
||
| 40 | 40 | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @throws ORMException |
|
| 45 | - */ |
|
| 43 | + /** |
|
| 44 | + * @throws ORMException |
|
| 45 | + */ |
|
| 46 | 46 | protected function getTeam(): ?Team |
| 47 | 47 | { |
| 48 | 48 | return $this->tokenStorageToTeamTransformer->transform($this->tokenStorage->getToken()); |
@@ -23,8 +23,7 @@ |
||
| 23 | 23 | TokenStorageToPlayerTransformer $tokenStorageToPlayerTransformer, |
| 24 | 24 | TokenStorageToTeamTransformer $tokenStorageToTeamTransformer, |
| 25 | 25 | TokenStorageInterface $tokenStorage |
| 26 | - ) |
|
| 27 | - { |
|
| 26 | + ) { |
|
| 28 | 27 | $this->em = $em; |
| 29 | 28 | $this->tokenStorageToPlayerTransformer = $tokenStorageToPlayerTransformer; |
| 30 | 29 | $this->tokenStorageToTeamTransformer = $tokenStorageToTeamTransformer; |
@@ -179,7 +179,7 @@ |
||
| 179 | 179 | |
| 180 | 180 | try { |
| 181 | 181 | return $query->getQuery()->getSingleScalarResult(); |
| 182 | - } catch (NoResultException|NonUniqueResultException $e) { |
|
| 182 | + } catch (NoResultException | NonUniqueResultException $e) { |
|
| 183 | 183 | return null; |
| 184 | 184 | } |
| 185 | 185 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | 'type', EntityType::class, |
| 20 | 20 | [ |
| 21 | 21 | 'class' => ChartType::class, |
| 22 | - 'query_builder' => function (EntityRepository $er) { |
|
| 22 | + 'query_builder' => function(EntityRepository $er) { |
|
| 23 | 23 | return $er->createQueryBuilder('ct') |
| 24 | 24 | ->orderBy('ct.name', 'ASC'); |
| 25 | 25 | }, |