@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | public function onMessage($msgData, $message) |
| 79 | 79 | { |
| 80 | - $channelID = (int)$msgData['message']['channelID']; |
|
| 80 | + $channelID = (int) $msgData['message']['channelID']; |
|
| 81 | 81 | |
| 82 | 82 | if (in_array($channelID, $this->excludeChannel, true)) { |
| 83 | 83 | return null; |
@@ -113,9 +113,9 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | while ($rows = $result->fetch_assoc()) { |
| 116 | - $charID = (int)$rows['characterID']; |
|
| 117 | - $corpID = (int)$rows['corporationID']; |
|
| 118 | - $allianceID = (int)$rows['allianceID']; |
|
| 116 | + $charID = (int) $rows['characterID']; |
|
| 117 | + $corpID = (int) $rows['corporationID']; |
|
| 118 | + $allianceID = (int) $rows['allianceID']; |
|
| 119 | 119 | |
| 120 | 120 | //If corp is new store in DB |
| 121 | 121 | $corpInfo = getCorpInfo($corpID); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | return null; |
| 127 | 127 | } |
| 128 | 128 | $corpTicker = $corpDetails['ticker']; |
| 129 | - $corpName = (string)$corpDetails['corporation_name']; |
|
| 129 | + $corpName = (string) $corpDetails['corporation_name']; |
|
| 130 | 130 | if (null !== $corpTicker) { |
| 131 | 131 | addCorpInfo($corpID, $corpTicker, $corpName); |
| 132 | 132 | } |
@@ -158,10 +158,10 @@ discard block |
||
| 158 | 158 | //Check if corpID matches |
| 159 | 159 | if ($corpID === $authGroup['corpID'] && $allianceID === $authGroup['allianceID']) { |
| 160 | 160 | foreach ($roles as $role) { |
| 161 | - if ((string)$role->name === (string)$authGroup['corpMemberRole']) { |
|
| 161 | + if ((string) $role->name === (string) $authGroup['corpMemberRole']) { |
|
| 162 | 162 | $member->addRole($role); |
| 163 | 163 | } |
| 164 | - if ((string)$role->name === (string)$authGroup['allyMemberRole']) { |
|
| 164 | + if ((string) $role->name === (string) $authGroup['allyMemberRole']) { |
|
| 165 | 165 | $member->addRole($role); |
| 166 | 166 | $role = 'corp/ally'; |
| 167 | 167 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | //Check if corpID matches |
| 173 | 173 | if ($corpID === $authGroup['corpID']) { |
| 174 | 174 | foreach ($roles as $role) { |
| 175 | - if ((string)$role->name === (string)$authGroup['corpMemberRole']) { |
|
| 175 | + if ((string) $role->name === (string) $authGroup['corpMemberRole']) { |
|
| 176 | 176 | $member->addRole($role); |
| 177 | 177 | $role = 'corp'; |
| 178 | 178 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | //Check if allianceID matches |
| 183 | 183 | if ($allianceID === $authGroup['allianceID'] && $authGroup['allianceID'] !== 0) { |
| 184 | 184 | foreach ($roles as $role) { |
| 185 | - if ((string)$role->name === (string)$authGroup['allyMemberRole']) { |
|
| 185 | + if ((string) $role->name === (string) $authGroup['allyMemberRole']) { |
|
| 186 | 186 | $member->addRole($role); |
| 187 | 187 | $role = 'ally'; |
| 188 | 188 | } |
@@ -196,23 +196,23 @@ discard block |
||
| 196 | 196 | $allianceContacts = getContacts($allianceID); |
| 197 | 197 | $corpContacts = getContacts($corpID); |
| 198 | 198 | foreach ($roles as $role) { |
| 199 | - if ((@(int)$allianceContacts['standings'] === 5 || @(int)$corpContacts['standings'] === 5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus5Role']) { |
|
| 199 | + if ((@(int) $allianceContacts['standings'] === 5 || @(int) $corpContacts['standings'] === 5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus5Role']) { |
|
| 200 | 200 | $member->addRole($role); |
| 201 | 201 | $role = 'blue'; |
| 202 | 202 | } |
| 203 | - if ((@(int)$allianceContacts['standings'] === 10 || @(int)$corpContacts['standings'] === 10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['plus10Role']) { |
|
| 203 | + if ((@(int) $allianceContacts['standings'] === 10 || @(int) $corpContacts['standings'] === 10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['plus10Role']) { |
|
| 204 | 204 | $member->addRole($role); |
| 205 | 205 | $role = 'blue'; |
| 206 | 206 | } |
| 207 | - if ((@(int)$allianceContacts['standings'] === 0 || @(int)$corpContacts['standings'] === 0 || (@(int)$allianceContacts['standings'] && @(int)$corpContacts['standings'] === null || '')) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['neutralRole']) { |
|
| 207 | + if ((@(int) $allianceContacts['standings'] === 0 || @(int) $corpContacts['standings'] === 0 || (@(int) $allianceContacts['standings'] && @(int) $corpContacts['standings'] === null || '')) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['neutralRole']) { |
|
| 208 | 208 | $member->addRole($role); |
| 209 | 209 | $role = 'neut'; |
| 210 | 210 | } |
| 211 | - if ((@(int)$allianceContacts['standings'] === -5 || @(int)$corpContacts['standings'] === -5) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus5Role']) { |
|
| 211 | + if ((@(int) $allianceContacts['standings'] === -5 || @(int) $corpContacts['standings'] === -5) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus5Role']) { |
|
| 212 | 212 | $member->addRole($role); |
| 213 | 213 | $role = 'red'; |
| 214 | 214 | } |
| 215 | - if ((@(int)$allianceContacts['standings'] === -10 || @(int)$corpContacts['standings'] === -10) && (string)$role->name === (string)$this->config['plugins']['auth']['standings']['minus10Role']) { |
|
| 215 | + if ((@(int) $allianceContacts['standings'] === -10 || @(int) $corpContacts['standings'] === -10) && (string) $role->name === (string) $this->config['plugins']['auth']['standings']['minus10Role']) { |
|
| 216 | 216 | $member->addRole($role); |
| 217 | 217 | $role = 'red'; |
| 218 | 218 | } |