Passed
Branch hosted (3752c4)
by Bob
10:04
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/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.
src/plugins/onTick/periodicStatusCheck.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         //Crest
81 81
         $crestData = json_decode(downloadData('https://crest-tq.eveonline.com/'), true);
82 82
         $crestStatus = isset($crestData['serviceStatus']) ? $crestData['serviceStatus'] : 'offline';
83
-        $tqOnline = (int)@$crestData['userCount'];
83
+        $tqOnline = (int) @$crestData['userCount'];
84 84
         
85 85
         if ($lastStatus === $crestStatus) {
86 86
             // No change
Please login to merge, or discard this patch.
src/plugins/onTick/siphons.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -108,15 +108,15 @@  discard block
 block discarded – undo
108 108
             $rawGoo = array(16634, 16643, 16647, 16641, 16640, 16635, 16648, 16633, 16646, 16651, 16650, 16644, 16652, 16639, 16636, 16649, 16653, 16638, 16637, 16642);
109 109
             foreach (@$xml->result->rowset->row as $structures) {
110 110
                 //Check silos
111
-                if ((int)@$structures->attributes()->typeID === 14343) {
111
+                if ((int) @$structures->attributes()->typeID === 14343) {
112 112
                     if (isset($structures->rowset->row)) {
113 113
                         foreach (@$structures->rowset->row as $silo) {
114 114
                             //Avoid reporting empty silos
115
-                            if ((int)@$silo->attributes()->quantity !== 0 && in_array(@$silo->attributes()->typeID, $rawGoo, false)) {
115
+                            if ((int) @$silo->attributes()->quantity !== 0 && in_array(@$silo->attributes()->typeID, $rawGoo, false)) {
116 116
                                 $siloID = $structures->attributes()->itemID;
117 117
                                 $lastAmount = getPermCache("silo{$siloID}Amount");
118 118
                                 $gooAmount = $silo->attributes()->quantity;
119
-                                $gooDifference = (int)$gooAmount - (int)$lastAmount;
119
+                                $gooDifference = (int) $gooAmount - (int) $lastAmount;
120 120
                                 //Check if silo has been checked before
121 121
                                 if (null === $lastAmount || $gooDifference < 0) {
122 122
                                     setPermCache("silo{$siloID}Amount", $gooAmount);
@@ -140,15 +140,15 @@  discard block
 block discarded – undo
140 140
                         }
141 141
                     }
142 142
                 }
143
-                if ((int)@$structures->attributes()->typeID === 17982) {
143
+                if ((int) @$structures->attributes()->typeID === 17982) {
144 144
                     if (isset($structures->rowset->row)) {
145 145
                         foreach (@$structures->rowset->row as $coupling) {
146 146
                             //Avoid reporting empty coupling arrays
147
-                            if ((int)@$coupling->attributes()->quantity !== 0 && in_array(@$coupling->attributes()->typeID, $rawGoo, false)) {
147
+                            if ((int) @$coupling->attributes()->quantity !== 0 && in_array(@$coupling->attributes()->typeID, $rawGoo, false)) {
148 148
                                 $couplingID = $structures->attributes()->itemID;
149 149
                                 $lastAmount = getPermCache("couplingArray{$couplingID}Amount");
150 150
                                 $gooAmount = $coupling->attributes()->quantity;
151
-                                $gooDifference = (int)$gooAmount - (int)$lastAmount;
151
+                                $gooDifference = (int) $gooAmount - (int) $lastAmount;
152 152
                                 //Check if silo has been checked before
153 153
                                 if (null === $lastAmount || $gooDifference < 0) {
154 154
                                     setPermCache("couplingArray{$couplingID}Amount", $gooAmount);
Please login to merge, or discard this patch.
src/lib/eveApi.php 2 patches
Doc Comments   +12 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 /**
30 30
  * @param $url
31
- * @return SimpleXMLElement|null|string
31
+ * @return SimpleXMLElement|null
32 32
  */
33 33
 function makeApiRequest($url)
34 34
 {
@@ -117,6 +117,11 @@  discard block
 block discarded – undo
117 117
  * @return mixed
118 118
  */
119 119
 ////Character name to ID
120
+/**
121
+ * @param string $characterName
122
+ *
123
+ * @return string
124
+ */
120 125
 function characterID($characterName)
121 126
 {
122 127
     $logger = new Logger('eveESI');
@@ -197,6 +202,9 @@  discard block
 block discarded – undo
197 202
  * @return mixed
198 203
  */
199 204
 ////Corp name to ID
205
+/**
206
+ * @param string $corpName
207
+ */
200 208
 function corpID($corpName)
201 209
 {
202 210
     $logger = new Logger('eveESI');
@@ -364,6 +372,9 @@  discard block
 block discarded – undo
364 372
 }
365 373
 
366 374
 ////Char/Object ID to name via CCP
375
+/**
376
+ * @param string $moonID
377
+ */
367 378
 function apiMoonName($moonID)
368 379
 {
369 380
     $url = "https://api.eveonline.com/eve/CharacterName.xml.aspx?IDs={$moonID}";
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 function characterName($characterID)
103 103
 {
104 104
     $character = characterDetails($characterID);
105
-    $name = (string)$character['name'];
105
+    $name = (string) $character['name'];
106 106
     if (null === $name || '' === $name) { // Make sure it's always set.
107 107
         $url = "https://api.eveonline.com/eve/CharacterName.xml.aspx?ids={$characterID}";
108 108
         $xml = makeApiRequest($url);
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             // Close the connection
143 143
             curl_close($ch);
144 144
             $data = json_decode($data, TRUE);
145
-            $id = (int)$data['character'][0];
145
+            $id = (int) $data['character'][0];
146 146
 
147 147
         } catch (Exception $e) {
148 148
             $logger->error('EVE ESI Error: ' . $e->getMessage() . ' - Attempting ESI again.');
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             // Close the connection
240 240
             curl_close($ch);
241 241
             $data = json_decode($data, TRUE);
242
-            $name = (string)$data['solar_system_name'];
242
+            $name = (string) $data['solar_system_name'];
243 243
 
244 244
         } catch (Exception $e) {
245 245
             $logger->error('EVE ESI Error: ' . $e->getMessage() . ' - Attempting ESI again.');
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             // Close the connection
292 292
             curl_close($ch);
293 293
             $data = json_decode($data, TRUE);
294
-            $id = (int)$data['corporation'][0];
294
+            $id = (int) $data['corporation'][0];
295 295
 
296 296
         } catch (Exception $e) {
297 297
             $logger->error('EVE ESI Error: ' . $e->getMessage() . ' - Attempting ESI again.');
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 function corpName($corpID)
324 324
 {
325 325
     $corporation = corpDetails($corpID);
326
-    $name = (string)$corporation['corporation_name'];
326
+    $name = (string) $corporation['corporation_name'];
327 327
     if (null === $name || '' === $name) { // Make sure it's always set.
328 328
         $url = "https://api.eveonline.com/eve/CharacterName.xml.aspx?ids={$corpID}";
329 329
         $xml = makeApiRequest($url);
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
             // Close the connection
410 410
             curl_close($ch);
411 411
             $data = json_decode($data, TRUE);
412
-            $name = (string)$data['alliance_name'];
412
+            $name = (string) $data['alliance_name'];
413 413
 
414 414
         } catch (Exception $e) {
415 415
             $logger->error('EVE ESI Error: ' . $e->getMessage() . ' - Attempting ESI again.');
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
             // Close the connection
464 464
             curl_close($ch);
465 465
             $data = json_decode($data, TRUE);
466
-            $id = (int)$data['solarsystem'][0];
466
+            $id = (int) $data['solarsystem'][0];
467 467
 
468 468
         } catch (Exception $e) {
469 469
             $logger->error('EVE ESI Error: ' . $e->getMessage() . ' - Attempting ESI again.');
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
             // Close the connection
516 516
             curl_close($ch);
517 517
             $data = json_decode($data, TRUE);
518
-            $name = (string)$data['name'];
518
+            $name = (string) $data['name'];
519 519
 
520 520
         } catch (Exception $e) {
521 521
             $logger->error('EVE ESI Error: ' . $e->getMessage() . ' - Attempting ESI again.');
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
         $logger->error('Fuzzwork Error: ' . $e->getMessage());
570 570
         return null;
571 571
     }
572
-    $id = (int)$data['typeID'];
572
+    $id = (int) $data['typeID'];
573 573
 
574 574
     if (null === $id) { // Make sure it's always set.
575 575
         $id = 'Unknown';
Please login to merge, or discard this patch.
src/plugins/admin/setAvatar.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
             $roles = $member->roles;
71 71
             foreach ($roles as $role) {
72 72
                 if (in_array($role->name, $adminRoles, true)) {
73
-                    $avatarURL = strtolower((string)$data['messageString']);
73
+                    $avatarURL = strtolower((string) $data['messageString']);
74 74
                     $ch = curl_init($avatarURL);
75 75
                     if (substr($avatarURL, -4) === '.jpg') {
76 76
                         $fp = fopen('/tmp/avatar.jpg', 'wb');
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,6 @@
 block discarded – undo
23 23
  * SOFTWARE.
24 24
  */
25 25
 
26
-use Discord\Parts\User\Client;
27
-
28 26
 /**
29 27
  * @property  message
30 28
  */
Please login to merge, or discard this patch.
src/lib/Db.php 2 patches
Doc Comments   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 /**
93 93
  * @param string $query
94 94
  * @param array $params
95
- * @param null $db
95
+ * @param string $db
96 96
  * @return null|void
97 97
  * @internal param string $db
98 98
  */
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 /**
124 124
  * @param string $query
125 125
  * @param array $params
126
- * @param null $db
126
+ * @param string $db
127 127
  * @return array|void
128 128
  * @internal param string $db
129 129
  */
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 /**
147 147
  * @param string $query
148 148
  * @param array $params
149
- * @param null $db
149
+ * @param string $db
150 150
  * @internal param string $db
151 151
  */
152 152
 function dbExecute($query, array $params = array(), $db = null)
@@ -243,6 +243,9 @@  discard block
 block discarded – undo
243 243
 }
244 244
 
245 245
 //CORP INFO
246
+/**
247
+ * @param string $corpName
248
+ */
246 249
 function addCorpInfo($corpID, $corpTicker, $corpName)
247 250
 {
248 251
     dbExecute('REPLACE INTO corpCache (`corpID`, `corpTicker`, `corpName`) VALUES (:corpID,:corpTicker,:corpName)', array(':corpID' => $corpID, ':corpTicker' => $corpTicker, ':corpName' => $corpName));
@@ -301,6 +304,10 @@  discard block
 block discarded – undo
301 304
     return dbQueryRow('SELECT * FROM pendingUsers WHERE `authString` = :authString AND `active` = :active', array(':authString' => $code, ':active' => $active), $db);
302 305
 }
303 306
 
307
+/**
308
+ * @param integer $charID
309
+ * @param integer $id
310
+ */
304 311
 function insertNewUser($userID, $charID, $eveName, $id, $role = 'corp')
305 312
 {
306 313
     $active = 'yes';
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -305,7 +305,7 @@
 block discarded – undo
305 305
 {
306 306
     $active = 'yes';
307 307
     $db = 'auth';
308
-    dbExecute('REPLACE into authUsers (`characterID`, `discordID`, `eveName`, `active`, `role`) VALUES (:characterID, :discordID, :eveName, :active, :role)', array(':characterID' => $charID, ':discordID' => $userID, ':eveName' => (string)$eveName, ':active' => $active, ':role' => (string)$role), $db);
308
+    dbExecute('REPLACE into authUsers (`characterID`, `discordID`, `eveName`, `active`, `role`) VALUES (:characterID, :discordID, :eveName, :active, :role)', array(':characterID' => $charID, ':discordID' => $userID, ':eveName' => (string) $eveName, ':active' => $active, ':role' => (string) $role), $db);
309 309
     dbExecute('DELETE from pendingUsers WHERE `id` = :id', array(':id' => $id), $db);
310 310
 }
311 311
 
Please login to merge, or discard this patch.
Dramiel.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
 $discord->on(
141 141
     'ready',
142
-    function ($discord) use ($logger, $config, $primary, $plugins, $pluginsT) {
142
+    function($discord) use ($logger, $config, $primary, $plugins, $pluginsT) {
143 143
         // In here we can access any of the WebSocket events.
144 144
         //
145 145
         // There is a list of event constants that you can
@@ -162,21 +162,21 @@  discard block
 block discarded – undo
162 162
         $discord->updatePresence($game);
163 163
 
164 164
         // Server Status Check (tick plugins will not run if eve is offline)
165
-        $discord->loop->addPeriodicTimer(60, function () use ($logger) {
165
+        $discord->loop->addPeriodicTimer(60, function() use ($logger) {
166 166
             $crestData = json_decode(downloadData('https://crest-tq.eveonline.com/'), true);
167 167
             $crestStatus = isset($crestData['serviceStatus']) ? $crestData['serviceStatus'] : 'offline';
168 168
             setPermCache('serverState', $crestStatus);
169 169
         });
170 170
 
171 171
         // Run the Tick plugins
172
-        $discord->loop->addPeriodicTimer(3, function () use ($pluginsT) {
172
+        $discord->loop->addPeriodicTimer(3, function() use ($pluginsT) {
173 173
             foreach ($pluginsT as $plugin) {
174 174
                 $plugin->tick();
175 175
             }
176 176
         });
177 177
 
178 178
         // Message queue
179
-        $discord->loop->addPeriodicTimer(7, function () use ($discord, $logger) {
179
+        $discord->loop->addPeriodicTimer(7, function() use ($discord, $logger) {
180 180
             $x = 0;
181 181
             while ($x < 3) {
182 182
                 $id = getOldestMessage();
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                         clearQueuedMessages($id);
200 200
                         continue;
201 201
                     }
202
-                    $channel = $guild->channels->get('id', (int)$queuedMessage['channel']);
202
+                    $channel = $guild->channels->get('id', (int) $queuedMessage['channel']);
203 203
                     //Check if channel is bad
204 204
                     if (null === $channel) {
205 205
                         $logger->addInfo("QueueProcessing Error- Item #{$id} : Channel provided is incorrect, removing it from the queue");
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
         });
241 241
 
242 242
         // Mem cleanup every 30 minutes
243
-        $discord->loop->addPeriodicTimer(1800, function () use ($logger) {
243
+        $discord->loop->addPeriodicTimer(1800, function() use ($logger) {
244 244
             $logger->addInfo('Memory in use: ' . memory_get_usage() / 1024 / 1024 . 'MB');
245 245
             gc_collect_cycles(); // Collect garbage
246 246
             $logger->addInfo('Memory in use after garbage collection: ' . memory_get_usage() / 1024 / 1024 . 'MB');
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
         $discord->on(
250 250
             Event::MESSAGE_CREATE,
251
-            function ($message) use ($logger, $config, $primary, $plugins) {
251
+            function($message) use ($logger, $config, $primary, $plugins) {
252 252
 
253 253
                 $msgData = array(
254 254
                     'message' => array(
Please login to merge, or discard this patch.
src/plugins/onMessage/auth.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function onMessage($msgData, $message)
72 72
     {
73
-        $channelID = (int)$msgData['message']['channelID'];
73
+        $channelID = (int) $msgData['message']['channelID'];
74 74
 
75 75
         if (in_array($channelID, $this->excludeChannel, true)) {
76 76
             return null;
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
             }
107 107
 
108 108
             while ($rows = $result) {
109
-                $charID = (int)$rows['characterID'];
110
-                $id = (int)$rows['id'];
111
-                $corpID = (int)$rows['corporationID'];
112
-                $allianceID = (int)$rows['allianceID'];
109
+                $charID = (int) $rows['characterID'];
110
+                $id = (int) $rows['id'];
111
+                $corpID = (int) $rows['corporationID'];
112
+                $allianceID = (int) $rows['allianceID'];
113 113
 
114 114
                 //If corp is new store in DB
115 115
                 $corpInfo = getCorpInfo($corpID);
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                         return null;
121 121
                     }
122 122
                     $corpTicker = $corpDetails['ticker'];
123
-                    $corpName = (string)$corpDetails['corporation_name'];
123
+                    $corpName = (string) $corpDetails['corporation_name'];
124 124
                     if (null !== $corpTicker) {
125 125
                         addCorpInfo($corpID, $corpTicker, $corpName);
126 126
                     }
@@ -152,15 +152,15 @@  discard block
 block discarded – undo
152 152
                 }
153 153
                 foreach ($this->authGroups as $authGroup) {
154 154
                     //Check if it's set to match corp and alliance
155
-                    if ((int)$authGroup['corpID'] !== 0 && (int)$authGroup['allianceID'] !== 0) {
155
+                    if ((int) $authGroup['corpID'] !== 0 && (int) $authGroup['allianceID'] !== 0) {
156 156
                         //Check if corpID matches
157
-                        if ((int)$corpID === (int)$authGroup['corpID'] && (int)$allianceID === (int)$authGroup['allianceID']) {
157
+                        if ((int) $corpID === (int) $authGroup['corpID'] && (int) $allianceID === (int) $authGroup['allianceID']) {
158 158
                             foreach ($roles as $role) {
159
-                                if ((string)$role->name === (string)$authGroup['corpMemberRole']) {
159
+                                if ((string) $role->name === (string) $authGroup['corpMemberRole']) {
160 160
                                     $member->addRole($role);
161 161
                                     $role = 'corp/ally';
162 162
                                 }
163
-                                if ((string)$role->name === (string)$authGroup['allyMemberRole']) {
163
+                                if ((string) $role->name === (string) $authGroup['allyMemberRole']) {
164 164
                                     $member->addRole($role);
165 165
                                     $role = 'corp/ally';
166 166
                                 }
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
                         }
170 170
                     } else {
171 171
                         //Check if corpID matches
172
-                        if ((int)$corpID === (int)$authGroup['corpID']) {
172
+                        if ((int) $corpID === (int) $authGroup['corpID']) {
173 173
                             foreach ($roles as $role) {
174
-                                if ((string)$role->name === (string)$authGroup['corpMemberRole']) {
174
+                                if ((string) $role->name === (string) $authGroup['corpMemberRole']) {
175 175
                                     $member->addRole($role);
176 176
                                     $role = 'corp';
177 177
                                 }
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
                             break;
180 180
                         }
181 181
                         //Check if allianceID matches
182
-                        if ((int)$allianceID === (int)$authGroup['allianceID'] && (int)$authGroup['allianceID'] !== 0) {
182
+                        if ((int) $allianceID === (int) $authGroup['allianceID'] && (int) $authGroup['allianceID'] !== 0) {
183 183
                             foreach ($roles as $role) {
184
-                                if ((string)$role->name === (string)$authGroup['allyMemberRole']) {
184
+                                if ((string) $role->name === (string) $authGroup['allyMemberRole']) {
185 185
                                     $member->addRole($role);
186 186
                                     $role = 'ally';
187 187
                                 }
@@ -195,22 +195,22 @@  discard block
 block discarded – undo
195 195
                     $allianceContacts = getContacts($allianceID);
196 196
                     $corpContacts = getContacts($corpID);
197 197
                     foreach ($roles as $role) {
198
-                        if ((@(int)$allianceContacts['standing'] === 5 || @(int)$corpContacts['standing'] === 5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus5Role']) {
198
+                        if ((@(int) $allianceContacts['standing'] === 5 || @(int) $corpContacts['standing'] === 5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus5Role']) {
199 199
                             $member->addRole($role);
200 200
                             $role = 'blue';
201 201
                             break;
202 202
                         }
203
-                        if ((@(int)$allianceContacts['standing'] === 10 || @(int)$corpContacts['standing'] === 10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus10Role']) {
203
+                        if ((@(int) $allianceContacts['standing'] === 10 || @(int) $corpContacts['standing'] === 10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus10Role']) {
204 204
                             $member->addRole($role);
205 205
                             $role = 'blue';
206 206
                             break;
207 207
                         }
208
-                        if ((@(int)$allianceContacts['standing'] === -5 || @(int)$corpContacts['standing'] === -5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus5Role']) {
208
+                        if ((@(int) $allianceContacts['standing'] === -5 || @(int) $corpContacts['standing'] === -5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus5Role']) {
209 209
                             $member->addRole($role);
210 210
                             $role = 'red';
211 211
                             break;
212 212
                         }
213
-                        if ((@(int)$allianceContacts['standing'] === -10 || @(int)$corpContacts['standing'] === -10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus10Role']) {
213
+                        if ((@(int) $allianceContacts['standing'] === -10 || @(int) $corpContacts['standing'] === -10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus10Role']) {
214 214
                             $member->addRole($role);
215 215
                             $role = 'red';
216 216
                             break;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                     }
219 219
                     if ($role === null) {
220 220
                         foreach ($roles as $role) {
221
-                            if ((string)$role->name === (string)$this->config['plugins']['auth']['standings']['neutralRole']) {
221
+                            if ((string) $role->name === (string) $this->config['plugins']['auth']['standings']['neutralRole']) {
222 222
                                 $member->addRole($role);
223 223
                                 $role = 'neut';
224 224
                                 break;
Please login to merge, or discard this patch.