Completed
Pull Request — master (#22)
by Matthew
03:34 queued 01:56
created
src/commands.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@
 block discarded – undo
9 9
 use Ps2alerts\Api\Command\TestCommand;
10 10
 use Symfony\Component\Console\Application;
11 11
 
12
-require __DIR__ . '/../vendor/autoload.php';
12
+require __DIR__.'/../vendor/autoload.php';
13 13
 
14 14
 // ENV loading
15 15
 josegonzalez\Dotenv\Loader::load([
16
-    'filepath' => __DIR__ . '/../.env',
16
+    'filepath' => __DIR__.'/../.env',
17 17
     'toEnv'    => true
18 18
 ]);
19 19
 
20
-include __DIR__ . '/Command/CommandsCommon.php';
20
+include __DIR__.'/Command/CommandsCommon.php';
21 21
 
22 22
 $application = new Application();
23 23
 // List commands here
Please login to merge, or discard this patch.
src/Command/BaseCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     protected function configure()
13 13
     {
14
-        $container = include __DIR__ . '/../container.php';
14
+        $container = include __DIR__.'/../container.php';
15 15
 
16 16
         $this->container   = $container;
17 17
         $this->auraFactory = $container->get('Ps2alerts\Api\Factory\AuraFactory');
Please login to merge, or discard this patch.
src/Command/LeaderboardOutfitsCommand.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $this->playerLeaderboards($output);
30 30
 
31 31
         $end = microtime(true);
32
-        $output->writeln("Processing took " . gmdate("H:i:s", ($end - $start)));
32
+        $output->writeln("Processing took ".gmdate("H:i:s", ($end - $start)));
33 33
     }
34 34
 
35 35
     public function playerLeaderboards(OutputInterface $output)
@@ -41,16 +41,16 @@  discard block
 block discarded – undo
41 41
             'playerSuicides',
42 42
             'headshots'
43 43
         ];
44
-        $servers = [0,1,10,13,17,25,1000,2000];
44
+        $servers = [0, 1, 10, 13, 17, 25, 1000, 2000];
45 45
 
46
-        foreach($servers as $server) {
47
-            foreach($metrics as $metric) {
46
+        foreach ($servers as $server) {
47
+            foreach ($metrics as $metric) {
48 48
                 $this->markAsBeingUpdated($metric, $server);
49 49
             }
50 50
         }
51 51
 
52
-        foreach($servers as $server) {
53
-            foreach($metrics as $metric) {
52
+        foreach ($servers as $server) {
53
+            foreach ($metrics as $metric) {
54 54
                 $count = 0;
55 55
                 $limit = 10000;
56 56
                 $ladderLimit = 10000;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                         $query->where('playerServer', $server);
79 79
                     }
80 80
 
81
-                    $query->orderBy([$metric . ' DESC']);
81
+                    $query->orderBy([$metric.' DESC']);
82 82
                     $query->limit($limit);
83 83
                     $query->offset($count);
84 84
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                         $playerPosKey = "ps2alerts:api:leaderboards:players:pos:{$player->playerID}";
94 94
 
95 95
                         // If player record doesn't exist
96
-                        if (! $this->redis->exists($playerPosKey)) {
96
+                        if (!$this->redis->exists($playerPosKey)) {
97 97
                             $data = [
98 98
                                 'id'      => $player->playerID,
99 99
                                 'updated' => date('U', strtotime('now'))
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                         }
104 104
 
105 105
                         // For first time running
106
-                        if (! empty($data[$server][$metric])) {
106
+                        if (!empty($data[$server][$metric])) {
107 107
                             $data[$server][$metric]['old'] = $data[$server][$metric]['new'];
108 108
                         } else {
109 109
                             $data[$server][$metric]['old'] = 0;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         $key = "ps2alerts:api:leaderboards:status:{$metric}:{$server}";
130 130
 
131 131
         // Create the key if it doesn't exist for some reason (1st runs)
132
-        if (! $this->redis->exists($key)) {
132
+        if (!$this->redis->exists($key)) {
133 133
             $data = [
134 134
                 'beingUpdated' => 1,
135 135
                 'lastUpdated'  => 'never'
Please login to merge, or discard this patch.