Passed
Branch develop (6d6783)
by BENARD
03:42
created
src/Service/Dwh/DwhPlayerHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     private EntityManager $dwhEntityManager;
15 15
     private DwhPlayerProvider $dwhPlayerProvider;
16 16
 
17
-    public function __construct(EntityManager $dwhEntityManager,DwhPlayerProvider $dwhPlayerProvider)
17
+    public function __construct(EntityManager $dwhEntityManager, DwhPlayerProvider $dwhPlayerProvider)
18 18
     {
19 19
         $this->dwhEntityManager = $dwhEntityManager;
20 20
         $this->dwhPlayerProvider = $dwhPlayerProvider;
Please login to merge, or discard this patch.
src/Service/Dwh/DwhTeamHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
         foreach ($list as $row) {
37 37
             $idTeam = $row['id'];
38
-            $dwhTeam= new DwhTeam();
38
+            $dwhTeam = new DwhTeam();
39 39
             $dwhTeam->setDate($date1->format('Y-m-d'));
40 40
             $dwhTeam->setFromArray($row);
41 41
             $dwhTeam->setNbPostDay((isset($data1[$idTeam])) ? $data1[$idTeam] : 0);
Please login to merge, or discard this patch.
src/Service/TopGameProvider.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getTop(DateTime $date1Begin, DateTime $date1End, DateTime $date2Begin, DateTime $date2End, int $limit = 20): array
32 32
     {
33
-         /** @var DwhGameRepository $dwhGameRepository */
33
+            /** @var DwhGameRepository $dwhGameRepository */
34 34
         $dwhGameRepository = $this->dwhEntityManager->getRepository('VideoGamesRecords\DwhBundle\Entity\Game');
35 35
 
36 36
         /** @var CoreGameRepository $coreGameRepository */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         $nbPostFromList = 0;
57
-        for ($i=0, $nb=count($gameList1) - 1; $i <= $nb; ++$i) {
57
+        for ($i = 0, $nb = count($gameList1) - 1; $i <= $nb; ++$i) {
58 58
             $idGame = $gameList1[$i]['id'];
59 59
             if (isset($oldRank[$idGame])) {
60 60
                 $gameList1[$i]['oldRank'] = $oldRank[$idGame];
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
         $nbGame = 0;
71 71
         try {
72 72
             $nbGame = $dwhGameRepository->getTotalNbGame($date1Begin, $date1End);
73
-        } catch (NoResultException|NonUniqueResultException $e) {
73
+        } catch (NoResultException | NonUniqueResultException $e) {
74 74
         }
75 75
         $nbTotalPost = 0;
76 76
         try {
77 77
             $nbTotalPost = $dwhGameRepository->getTotalNbPostDay($date1Begin, $date1End);
78
-        } catch (NoResultException|NonUniqueResultException $e) {
78
+        } catch (NoResultException | NonUniqueResultException $e) {
79 79
         }
80 80
 
81 81
         $gameList = ToolsRanking::addRank(
Please login to merge, or discard this patch.
src/Service/ArticleService.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,10 +110,10 @@
 block discarded – undo
110 110
     }
111 111
 
112 112
 
113
-     /**
114
-     * @param $day
115
-     * @throws Exception
116
-     */
113
+        /**
114
+         * @param $day
115
+         * @throws Exception
116
+         */
117 117
     public function postTopYear($day): void
118 118
     {
119 119
         $date1Begin = new DateTime($day);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 
43 43
         $week = $date1Begin->format('W');
44 44
 
45
-        $gamesData  = $this->topGameProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 20);
45
+        $gamesData = $this->topGameProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 20);
46 46
         $gamesHtmlEn = $this->getHtmlTopGame($gamesData, 'en');
47 47
         $gamesHtmlFr = $this->getHtmlTopGame($gamesData, 'fr');
48 48
 
49
-        $playersData  = $this->topPlayerProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 20);
49
+        $playersData = $this->topPlayerProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 20);
50 50
         $playersHtmlEn = $this->getHtmlTopPlayer($playersData, 'en');
51 51
         $playersHtmlFr = $this->getHtmlTopPlayer($playersData, 'fr');
52 52
 
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 
87 87
         $month = $date1Begin->format('F');
88 88
 
89
-        $gamesData  = $this->topGameProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 50);
89
+        $gamesData = $this->topGameProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 50);
90 90
         $gamesHtmlEn = $this->getHtmlTopGame($gamesData, 'en');
91 91
         $gamesHtmlFr = $this->getHtmlTopGame($gamesData, 'fr');
92 92
 
93
-        $playersData  = $this->topPlayerProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 50);
93
+        $playersData = $this->topPlayerProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 50);
94 94
         $playersHtmlEn = $this->getHtmlTopPlayer($playersData, 'en');
95 95
         $playersHtmlFr = $this->getHtmlTopPlayer($playersData, 'fr');
96 96
 
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 
131 131
         $year = $date1Begin->format('Y');
132 132
 
133
-        $gamesData  = $this->topGameProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 100);
133
+        $gamesData = $this->topGameProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 100);
134 134
         $gamesHtmlEn = $this->getHtmlTopGame($gamesData, 'en');
135 135
         $gamesHtmlFr = $this->getHtmlTopGame($gamesData, 'fr');
136 136
 
137 137
 
138
-        $playersData  = $this->topPlayerProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 100);
138
+        $playersData = $this->topPlayerProvider->getTop($date1Begin, $date1End, $date2Begin, $date2End, 100);
139 139
         $playersHtmlEn = $this->getHtmlTopPlayer($playersData, 'en');
140 140
         $playersHtmlFr = $this->getHtmlTopPlayer($playersData, 'fr');
141 141
 
Please login to merge, or discard this patch.
src/Service/TopPlayerProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
 
56 56
         $nbPostFromList = 0;
57
-        for ($i=0, $nb=count($playerList1) - 1; $i <= $nb; ++$i) {
57
+        for ($i = 0, $nb = count($playerList1) - 1; $i <= $nb; ++$i) {
58 58
             $idPlayer = $playerList1[$i]['id'];
59 59
             if (isset($oldRank[$idPlayer])) {
60 60
                 $playerList1[$i]['oldRank'] = $oldRank[$idPlayer];
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
         $nbPlayer = 0;
70 70
         try {
71 71
             $nbPlayer = $dwhPlayerRepository->getTotalNbPlayer($date1Begin, $date1End);
72
-        } catch (NoResultException|NonUniqueResultException $e) {
72
+        } catch (NoResultException | NonUniqueResultException $e) {
73 73
         }
74 74
 
75 75
         $nbTotalPost = 0;
76 76
         try {
77 77
             $nbTotalPost = $dwhPlayerRepository->getTotalNbPostDay($date1Begin, $date1End);
78
-        } catch (NoResultException|NonUniqueResultException $e) {
78
+        } catch (NoResultException | NonUniqueResultException $e) {
79 79
         }
80 80
 
81 81
         $playerList = ToolsRanking::addRank(
Please login to merge, or discard this patch.
src/Controller/PlayerController.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -67,23 +67,23 @@
 block discarded – undo
67 67
      */
68 68
     public function getMedalsByTime(Request $request): array
69 69
     {
70
-         $idPlayer = $request->query->get('idPlayer', null);
71
-         $list = $this->playerRepository->findBy(array('id' => $idPlayer), array('date' => 'ASC'));
70
+            $idPlayer = $request->query->get('idPlayer', null);
71
+            $list = $this->playerRepository->findBy(array('id' => $idPlayer), array('date' => 'ASC'));
72 72
 
73
-         $return = [
74
-             'rank0' => [],
75
-             'rank1' => [],
76
-             'rank2' => [],
77
-             'rank3' => [],
78
-             'date' => [],
79
-         ];
80
-         foreach ($list as $object) {
73
+            $return = [
74
+                'rank0' => [],
75
+                'rank1' => [],
76
+                'rank2' => [],
77
+                'rank3' => [],
78
+                'date' => [],
79
+            ];
80
+            foreach ($list as $object) {
81 81
             $return['rank0'][] = $object->getChartRank0();
82 82
             $return['rank1'][] = $object->getChartRank1();
83 83
             $return['rank2'][] = $object->getChartRank2();
84 84
             $return['rank3'][] = $object->getChartRank3();
85 85
             $return['date'][] = $object->getDate();
86
-         }
87
-         return $return;
86
+            }
87
+            return $return;
88 88
     }
89 89
 }
Please login to merge, or discard this patch.
src/Entity/Team.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
      */
134 134
     public function setId(int $id)
135 135
     {
136
-        $this->id= $id;
136
+        $this->id = $id;
137 137
         return $this;
138 138
     }
139 139
 
Please login to merge, or discard this patch.