Passed
Branch hosted (3752c4)
by Bob
10:04
created
src/plugins/onTick/authCheck.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $this->standingsBased = $config['plugins']['auth']['standings']['enabled'];
66 66
         $this->apiKey = $config['eve']['apiKeys'];
67 67
         $this->authGroups = $config['plugins']['auth']['authGroups'];
68
-        $this->alertChannel = (int)$config['plugins']['auth']['alertChannel'];
68
+        $this->alertChannel = (int) $config['plugins']['auth']['alertChannel'];
69 69
         $this->guild = $config['bot']['guild'];
70 70
         $this->nextCheck = 0;
71 71
 
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
         //Set corp/ally id arrays
154 154
         foreach ($this->authGroups as $authGroup) {
155 155
             if ($authGroup['corpID'] !== 0) {
156
-                $corpArray[] = (int)$authGroup['corpID'];
156
+                $corpArray[] = (int) $authGroup['corpID'];
157 157
             }
158 158
             if ($authGroup['allianceID'] !== 0) {
159
-                $allianceArray[] = (int)$authGroup['allianceID'];
159
+                $allianceArray[] = (int) $authGroup['allianceID'];
160 160
             }
161 161
         }
162 162
 
@@ -189,17 +189,17 @@  discard block
 block discarded – undo
189 189
                 if ($role === 'blue' || 'neut' || 'red') {
190 190
                     $allianceContacts = getContacts($allianceID);
191 191
                     $corpContacts = getContacts($corporationID);
192
-                    if ($role === 'blue' && ((int)$allianceContacts['standing'] === 5 || 10 || (int)$corpContacts['standing'] === 5 || 10)) {
192
+                    if ($role === 'blue' && ((int) $allianceContacts['standing'] === 5 || 10 || (int) $corpContacts['standing'] === 5 || 10)) {
193 193
                         $standings = 1;
194 194
                     }
195
-                    if ($role === 'red' && ((int)$allianceContacts['standing'] === -5 || -10 || (int)$corpContacts['standing'] === -5 || -10)) {
195
+                    if ($role === 'red' && ((int) $allianceContacts['standing'] === -5 || -10 || (int) $corpContacts['standing'] === -5 || -10)) {
196 196
                         $standings = 1;
197 197
                     }
198
-                    if ($role === 'neut' && ((int)$allianceContacts['standing'] === 0 || (int)$corpContacts['standing'] === 0 || (@(int)$allianceContacts['standings'] === null || '' && @(int)$corpContacts['standings'] === null || ''))) {
198
+                    if ($role === 'neut' && ((int) $allianceContacts['standing'] === 0 || (int) $corpContacts['standing'] === 0 || (@(int) $allianceContacts['standings'] === null || '' && @(int) $corpContacts['standings'] === null || ''))) {
199 199
                         $standings = 1;
200 200
                     }
201 201
                 }
202
-                if (!in_array((int)$allianceID, $allianceArray) && !in_array((int)$corporationID, $corpArray) && null === $standings) {
202
+                if (!in_array((int) $allianceID, $allianceArray) && !in_array((int) $corporationID, $corpArray) && null === $standings) {
203 203
                     // Deactivate user in database
204 204
                     disableUser($discordID);
205 205
                     continue;
@@ -350,10 +350,10 @@  discard block
 block discarded – undo
350 350
                     }
351 351
                     $nick = null;
352 352
                     if (null !== @$corpInfo['corpTicker']) {
353
-                        $corpTicker = (string)$corpInfo['corpTicker'];
353
+                        $corpTicker = (string) $corpInfo['corpTicker'];
354 354
                         if ($this->nameEnforce === 'true') {
355 355
                             $nick = "[{$corpTicker}] {$eveName}";
356
-                        } elseif ((string)$nickName === "[{$corpTicker}]") {
356
+                        } elseif ((string) $nickName === "[{$corpTicker}]") {
357 357
                             $nick = "[{$corpTicker}] {$userName}";
358 358
                         } elseif (strpos($nickName, $corpTicker) === false) {
359 359
                             $nick = "[{$corpTicker}] {$nickName}";
@@ -374,11 +374,11 @@  discard block
 block discarded – undo
374 374
                     if (@$corpTicker === 'U') {
375 375
                         continue;
376 376
                     }
377
-                    $corpName = (string)$corporationDetails['corporation_name'];
377
+                    $corpName = (string) $corporationDetails['corporation_name'];
378 378
                     if (null !== $corpTicker) {
379 379
                         if ($this->nameEnforce === 'true') {
380 380
                             $nick = "[{$corpTicker}] {$eveName}";
381
-                        } elseif ((string)$nickName === "[{$corpTicker}]") {
381
+                        } elseif ((string) $nickName === "[{$corpTicker}]") {
382 382
                             $nick = "[{$corpTicker}] {$userName}";
383 383
                         } elseif (strpos($nickName, $corpTicker) === false) {
384 384
                             $nick = "[{$corpTicker}] {$nickName}";
@@ -412,14 +412,14 @@  discard block
 block discarded – undo
412 412
     private function standingsUpdate()
413 413
     {
414 414
         foreach ($this->apiKey as $apiKey) {
415
-            if ((string)$apiKey['keyID'] === (string)$this->config['plugins']['auth']['standings']['apiKey']) {
415
+            if ((string) $apiKey['keyID'] === (string) $this->config['plugins']['auth']['standings']['apiKey']) {
416 416
                 $url = "https://api.eveonline.com/char/ContactList.xml.aspx?keyID={$apiKey['keyID']}&vCode={$apiKey['vCode']}&characterID={$apiKey['characterID']}";
417 417
                 $xml = makeApiRequest($url);
418 418
                 if (empty($xml)) {
419 419
                     return null;
420 420
                 }
421 421
                 foreach ($xml->result->rowset as $contactType) {
422
-                    if ((string)$contactType->attributes()->name === 'corporateContactList' || 'allianceContactList') {
422
+                    if ((string) $contactType->attributes()->name === 'corporateContactList' || 'allianceContactList') {
423 423
                         foreach ($contactType->row as $contact) {
424 424
                             if (null !== $contact['contactID'] && $contact['contactName'] && $contact['standing']) {
425 425
                                 addContactInfo($contact['contactID'], $contact['contactName'], $contact['standing']);
Please login to merge, or discard this patch.
src/plugins/onTick/siloFull.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
             $towerFull = 30000;
97 97
             $cleanFull = number_format($towerFull);
98 98
         }
99
-        if ($this->towerRace ==='2') {
99
+        if ($this->towerRace === '2') {
100 100
             $towerMulti = 1;
101 101
             $towerFull = 40000;
102 102
             $cleanFull = number_format($towerFull);
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -192,8 +192,8 @@
 block discarded – undo
192 192
             )
193 193
         ),
194 194
         'standings' => array(
195
-            'enabled' => dbQueryField("SELECT value FROM config WHERE variable = 'standingsEnabled'", 'value', array(), 'config'),//set to true if you want to allow people to auth based off of corp/alliance standings
196
-            'apiKey' => dbQueryField("SELECT value FROM config WHERE variable = 'standingsApiKey'", 'value', array(), 'config'),//enter the KEYID for whatever above api you'd like to base standings off of
195
+            'enabled' => dbQueryField("SELECT value FROM config WHERE variable = 'standingsEnabled'", 'value', array(), 'config'), //set to true if you want to allow people to auth based off of corp/alliance standings
196
+            'apiKey' => dbQueryField("SELECT value FROM config WHERE variable = 'standingsApiKey'", 'value', array(), 'config'), //enter the KEYID for whatever above api you'd like to base standings off of
197 197
             'plus10Role' => dbQueryField("SELECT value FROM config WHERE variable = 'standingsPlus10'", 'value', array(), 'config'),
198 198
             'plus5Role' => dbQueryField("SELECT value FROM config WHERE variable = 'standingsPlus5'", 'value', array(), 'config'),
199 199
             'neutralRole' => dbQueryField("SELECT value FROM config WHERE variable = 'standingsNeutral'", 'value', array(), 'config'),
Please login to merge, or discard this patch.