Passed
Branch dev (6ab41f)
by
unknown
05:41 queued 02:41
created
src/plugins/onTick/notifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
                 $this->fuelChannel = $this->toDiscordChannel;
173 173
             }
174 174
             //Set timer for next key based on number of keys
175
-            $nextKey = (1900 / (int)$this->numberOfKeys) + time();
175
+            $nextKey = (1900 / (int) $this->numberOfKeys) + time();
176 176
             $nextKeyTime = gmdate("Y-m-d H:i:s", $nextKey);
177 177
             setPermCache("notificationsLastChecked", $nextKey);
178 178
             //Set cache timer for api key
Please login to merge, or discard this patch.
src/plugins/onTick/evemails.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
         $cacheClr = $baseUnix - 13500;
147 147
 
148 148
         //Set timer for next key based on number of keys
149
-        $nextKey = (1900 / (int)$this->numberOfKeys) + time();
149
+        $nextKey = (1900 / (int) $this->numberOfKeys) + time();
150 150
         $nextKeyTime = gmdate("Y-m-d H:i:s", $nextKey);
151 151
         setPermCache("mailLastChecked", $nextKey);
152 152
 
Please login to merge, or discard this patch.
Dramiel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -158,21 +158,21 @@  discard block
 block discarded – undo
158 158
         $discord->updatePresence($game);
159 159
 
160 160
         // Server Status Check (tick plugins will not run if eve is offline)
161
-        $discord->loop->addPeriodicTimer(60, function () use ($logger) {
161
+        $discord->loop->addPeriodicTimer(60, function() use ($logger) {
162 162
             $crestData = json_decode(downloadData('https://crest-tq.eveonline.com/'), true);
163 163
             $crestStatus = isset($crestData['serviceStatus']) ? $crestData['serviceStatus'] : 'offline';
164 164
             setPermCache('serverState', $crestStatus);
165 165
         });
166 166
 
167 167
         // Run the Tick plugins
168
-        $discord->loop->addPeriodicTimer(3, function () use ($pluginsT) {
168
+        $discord->loop->addPeriodicTimer(3, function() use ($pluginsT) {
169 169
             foreach ($pluginsT as $plugin) {
170 170
                 $plugin->tick();
171 171
             }
172 172
         });
173 173
 
174 174
         // Message queue
175
-        $discord->loop->addPeriodicTimer(7, function () use ($discord, $logger) {
175
+        $discord->loop->addPeriodicTimer(7, function() use ($discord, $logger) {
176 176
             $x = 0;
177 177
             while ($x < 3) {
178 178
                 $id = getOldestMessage();
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         });
229 229
 
230 230
         // Mem cleanup every 30 minutes
231
-        $discord->loop->addPeriodicTimer(1800, function () use ($logger) {
231
+        $discord->loop->addPeriodicTimer(1800, function() use ($logger) {
232 232
             $logger->addInfo('Memory in use: ' . memory_get_usage() / 1024 / 1024 . 'MB');
233 233
             gc_collect_cycles(); // Collect garbage
234 234
             $logger->addInfo('Memory in use after garbage collection: ' . memory_get_usage() / 1024 / 1024 . 'MB');
Please login to merge, or discard this patch.
src/lib/eveApi.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 function characterName($characterID)
102 102
 {
103 103
     $character = characterDetails($characterID);
104
-    $name = (string)$character['name'];
104
+    $name = (string) $character['name'];
105 105
 
106 106
     if (null === $name) { // Make sure it's always set.
107 107
         $name = 'Unknown';
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     $url = "https://esi.tech.ccp.is/latest/search/?search={$characterName}&categories=character&language=en-us&strict=true&datasource=tranquility";
122 122
     $json = file_get_contents($url);
123 123
     $data = json_decode($json, TRUE);
124
-    $id = (int)$data['character'][0];
124
+    $id = (int) $data['character'][0];
125 125
 
126 126
     if (null === $id) { // Make sure it's always set.
127 127
         $id = 'Unknown';
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     $url = "https://esi.tech.ccp.is/latest/universe/systems/{$systemID}/";
159 159
     $json = file_get_contents($url);
160 160
     $data = json_decode($json, TRUE);
161
-    $name = (string)$data['solar_system_name'];
161
+    $name = (string) $data['solar_system_name'];
162 162
 
163 163
     if (null === $name) { // Make sure it's always set.
164 164
         $name = 'Unknown';
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     $url = "https://esi.tech.ccp.is/latest/search/?search={$corpName}&categories=corporation&language=en-us&strict=true&datasource=tranquility";
179 179
     $json = file_get_contents($url);
180 180
     $data = json_decode($json, TRUE);
181
-    $id = (int)$data['corporation'][0];
181
+    $id = (int) $data['corporation'][0];
182 182
 
183 183
     if (null === $id) { // Make sure it's always set.
184 184
         $id = 'Unknown';
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 function corpName($corpID)
197 197
 {
198 198
     $corporation = corpDetails($corpID);
199
-    $name = (string)$corporation['corporation_name'];
199
+    $name = (string) $corporation['corporation_name'];
200 200
 
201 201
     if (null === $name) { // Make sure it's always set.
202 202
         $name = 'Unknown';
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     $url = "https://esi.tech.ccp.is/latest/alliances/{$allianceID}/";
234 234
     $json = file_get_contents($url);
235 235
     $data = json_decode($json, TRUE);
236
-    $name = (string)$data['alliance_name'];
236
+    $name = (string) $data['alliance_name'];
237 237
 
238 238
     if (null === $name) { // Make sure it's always set.
239 239
         $name = 'Unknown';
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     $url = "https://esi.tech.ccp.is/latest/search/?search={$systemName}&categories=solarsystem&language=en-us&strict=true&datasource=tranquility";
254 254
     $json = file_get_contents($url);
255 255
     $data = json_decode($json, TRUE);
256
-    $id = (int)$data['solarsystem'][0];
256
+    $id = (int) $data['solarsystem'][0];
257 257
 
258 258
     if (null === $id) { // Make sure it's always set.
259 259
         $id = 'Unknown';
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
     $url = "https://esi.tech.ccp.is/latest/universe/types/{$typeID}/";
273 273
     $json = file_get_contents($url);
274 274
     $data = json_decode($json, TRUE);
275
-    $name = (string)$data['type_name'];
275
+    $name = (string) $data['type_name'];
276 276
 
277 277
     if (null === $name) { // Make sure it's always set.
278 278
         $name = 'Unknown';
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     $url = "https://www.fuzzwork.co.uk/api/typeid.php?typename={$typeName}";
293 293
     $json = file_get_contents($url);
294 294
     $data = json_decode($json, TRUE);
295
-    $id = (int)$data['typeID'];
295
+    $id = (int) $data['typeID'];
296 296
 
297 297
     if (null === $id) { // Make sure it's always set.
298 298
         $id = 'Unknown';
Please login to merge, or discard this patch.
src/plugins/onMessage/auth.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 if (null === $corpInfo) {
118 118
                     $corpDetails = corpDetails($corpID);
119 119
                     $corpTicker = $corpDetails['ticker'];
120
-                    $corpName = (string)$corpDetails['corporation_name'];
120
+                    $corpName = (string) $corpDetails['corporation_name'];
121 121
                     if (null !== $corpTicker) {
122 122
                         addCorpInfo($corpID, $corpTicker, $corpName);
123 123
                     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                     //Check if corpID matches
146 146
                     if ($corpID === $authGroup['corpID']) {
147 147
                         foreach ($roles as $role) {
148
-                            if ((string)$role->name === (string)$authGroup['corpMemberRole']) {
148
+                            if ((string) $role->name === (string) $authGroup['corpMemberRole']) {
149 149
                                 $member->addRole($role);
150 150
                                 $corpRoleSet = 1;
151 151
                             }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                     //Check if allianceID matches
155 155
                     if ($allianceID === $authGroup['allianceID'] && $authGroup['allianceID'] != 0) {
156 156
                         foreach ($roles as $role) {
157
-                            if ((string)$role->name === (string)$authGroup['allyMemberRole']) {
157
+                            if ((string) $role->name === (string) $authGroup['allyMemberRole']) {
158 158
                                 $member->addRole($role);
159 159
                                 $allianceRoleSet = 1;
160 160
                             }
Please login to merge, or discard this patch.
src/plugins/onTick/authCheck.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
         //Set corp/ally id arrays
155 155
         foreach ($this->authGroups as $authGroup) {
156 156
             if ($authGroup['corpID'] !== 0) {
157
-                $corpArray[] = (int)$authGroup['corpID'];
157
+                $corpArray[] = (int) $authGroup['corpID'];
158 158
             }
159 159
             if ($authGroup['allianceID'] !== 0) {
160
-                $allianceArray[] = (int)$authGroup['allianceID'];
160
+                $allianceArray[] = (int) $authGroup['allianceID'];
161 161
             }
162 162
         }
163 163
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                 $corporationID = $character['corporation_id'];
178 178
                 $corporationDetails = corpDetails($corporationID);
179 179
                 $allianceID = @$corporationDetails['alliance_id'];
180
-                if (!in_array((int)$allianceID, $allianceArray) && !in_array((int)$corporationID, $corpArray)) {
180
+                if (!in_array((int) $allianceID, $allianceArray) && !in_array((int) $corporationID, $corpArray)) {
181 181
                     // Deactivate user in database
182 182
                     $sql = "UPDATE authUsers SET active='no' WHERE discordID='$discordID'";
183 183
                     $this->logger->addInfo("AuthCheck: {$eveName} account has been deactivated as they are no longer in a correct corp/alliance.");
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         $guild = $this->discord->guilds->get('id', $this->guildID);
282 282
 
283 283
         //Get name queue status
284
-        $x = (int)getPermCache('nameQueueState');
284
+        $x = (int) getPermCache('nameQueueState');
285 285
 
286 286
         //Establish connection to mysql
287 287
         $conn = new mysqli($this->db, $this->dbUser, $this->dbPass, $this->dbName);
@@ -333,10 +333,10 @@  discard block
 block discarded – undo
333 333
                     $corpInfo = getCorpInfo($character['corporation_id']);
334 334
                     $nick = null;
335 335
                     if (null !== $corpInfo) {
336
-                        $corpTicker = (string)$corpInfo['corpTicker'];
336
+                        $corpTicker = (string) $corpInfo['corpTicker'];
337 337
                         if ($this->nameEnforce === 'true') {
338 338
                             $nick = "[{$corpTicker}] {$eveName}";
339
-                        } elseif ((string)$nickName === "[{$corpTicker}]") {
339
+                        } elseif ((string) $nickName === "[{$corpTicker}]") {
340 340
                             $nick = "[{$corpTicker}] {$userName}";
341 341
                         } elseif (strpos($nickName, $corpTicker) == false) {
342 342
                             $nick = "[{$corpTicker}] {$nickName}";
@@ -351,11 +351,11 @@  discard block
 block discarded – undo
351 351
                     $corporationID = $character['corporation_id'];
352 352
                     $corporationDetails = corpDetails($corporationID);
353 353
                     $corpTicker = $corporationDetails['ticker'];
354
-                    $corpName = (string)$corporationDetails['corporation_name'];
354
+                    $corpName = (string) $corporationDetails['corporation_name'];
355 355
                     if (null !== $corporationDetails) {
356 356
                         if ($this->nameEnforce === 'true') {
357 357
                             $nick = "[{$corpTicker}] {$eveName}";
358
-                        } elseif ((string)$nickName === "[{$corpTicker}]") {
358
+                        } elseif ((string) $nickName === "[{$corpTicker}]") {
359 359
                             $nick = "[{$corpTicker}] {$userName}";
360 360
                         } elseif (strpos($nickName, $corpTicker) === false) {
361 361
                             $nick = "[{$corpTicker}] {$nickName}";
Please login to merge, or discard this patch.
src/plugins/onTick/getKillmailsRedis.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -141,17 +141,17 @@
 block discarded – undo
141 141
                 $attackerAllianceArray = array();
142 142
 
143 143
                 foreach ($kill['killmail']['attackers'] as $attacker) {
144
-                    $attackerCorpArray[] = (int)@$attacker['corporation']['id'];
145
-                    $attackerAllianceArray[] = (int)@$attacker['alliance']['id'];
144
+                    $attackerCorpArray[] = (int) @$attacker['corporation']['id'];
145
+                    $attackerAllianceArray[] = (int) @$attacker['alliance']['id'];
146 146
                 }
147 147
 
148
-                if ((int)@$kill['killmail']['victim']['corporation']['id'] === $kmGroup['corpID'] && (int)$kmGroup['corpID'] !== 0) {
148
+                if ((int) @$kill['killmail']['victim']['corporation']['id'] === $kmGroup['corpID'] && (int) $kmGroup['corpID'] !== 0) {
149 149
                     $corpLoss = true;
150
-                } elseif ((int)@$kill['killmail']['victim']['alliance']['id'] === $kmGroup['allianceID'] && (int)$kmGroup['allianceID'] !== 0) {
150
+                } elseif ((int) @$kill['killmail']['victim']['alliance']['id'] === $kmGroup['allianceID'] && (int) $kmGroup['allianceID'] !== 0) {
151 151
                     $allianceLoss = true;
152
-                } elseif (in_array((int)$kmGroup['corpID'], $attackerCorpArray) && (int)$kmGroup['corpID'] !== 0) {
152
+                } elseif (in_array((int) $kmGroup['corpID'], $attackerCorpArray) && (int) $kmGroup['corpID'] !== 0) {
153 153
                     $corpKill = true;
154
-                } elseif (in_array((int)$kmGroup['allianceID'], $attackerAllianceArray) && (int)$kmGroup['allianceID'] !== 0) {
154
+                } elseif (in_array((int) $kmGroup['allianceID'], $attackerAllianceArray) && (int) $kmGroup['allianceID'] !== 0) {
155 155
                     $allianceKill = true;
156 156
                 } else {
157 157
                     break;
Please login to merge, or discard this patch.