@@ -30,9 +30,9 @@ |
||
30 | 30 | $this->em->flush(); |
31 | 31 | } |
32 | 32 | |
33 | - /** |
|
34 | - * @return array |
|
35 | - */ |
|
33 | + /** |
|
34 | + * @return array |
|
35 | + */ |
|
36 | 36 | private function getScoreToDesactivate(): array |
37 | 37 | { |
38 | 38 | $date = new \DateTime(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | $chart = $this->em->getRepository('VideoGamesRecords\CoreBundle\Entity\Chart')->find($mixed); |
31 | 31 | if (null === $chart) { |
32 | - return ; |
|
32 | + return; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | $this->groups[$chart->getGroup()->getId()] = $chart->getGroup(); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | if ($previousLibValue === $libValue) { |
86 | 86 | ++$nbEqual; |
87 | 87 | } else { |
88 | - $rank += $nbEqual; |
|
88 | + $rank += $nbEqual; |
|
89 | 89 | $nbEqual = 1; |
90 | 90 | $playerChartEqual = []; |
91 | 91 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $playerChart |
110 | 110 | ->setNbEqual($nbEqual) |
111 | 111 | ->setRank($rank) |
112 | - ->setPointChart((int)( |
|
112 | + ->setPointChart((int) ( |
|
113 | 113 | array_sum( |
114 | 114 | array_slice(array_values($pointsChart), $playerChart->getRank() - 1, $playerChart->getNbEqual()) |
115 | 115 | ) / $playerChart->getNbEqual() |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | if ($playerChart->getPlatform() != null) { |
128 | 128 | $idPlatForm = $playerChart->getPlatform()->getId(); |
129 | - $playerChart->setPointPlatform((int)( |
|
129 | + $playerChart->setPointPlatform((int) ( |
|
130 | 130 | array_sum( |
131 | 131 | array_slice(array_values($platforms[$idPlatForm]['points']), $platforms[$idPlatForm]['rank'] - 1, $platforms[$idPlatForm]['nbEqual']) |
132 | 132 | ) / $platforms[$idPlatForm]['nbEqual'] |
@@ -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 |
@@ -106,7 +106,7 @@ |
||
106 | 106 | $query->setParameter('rank', $i); |
107 | 107 | $row = $query->getOneOrNullResult(); |
108 | 108 | if ($row) { |
109 | - $data["gameRank$i"] = $row['nb']; |
|
109 | + $data["gamerank$i"] = $row['nb']; |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 |
@@ -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') |
@@ -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) { |