@@ -154,10 +154,10 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -332,12 +332,12 @@ discard block |
||
| 332 | 332 | $character = characterDetails($charID); |
| 333 | 333 | $corporationID = $character['corporation_id']; |
| 334 | 334 | $corporationDetails = corpDetails($corporationID); |
| 335 | - $corpTicker = (string)$corporationDetails['corpTicker']; |
|
| 336 | - $corpName = (string)$corporationDetails['corporation_name']; |
|
| 335 | + $corpTicker = (string) $corporationDetails['corpTicker']; |
|
| 336 | + $corpName = (string) $corporationDetails['corporation_name']; |
|
| 337 | 337 | if (null !== $corporationDetails) { |
| 338 | 338 | if ($this->nameEnforce === 'true') { |
| 339 | 339 | $nick = "[{$corpTicker}] {$eveName}"; |
| 340 | - } elseif ((string)$nickName === "[{$corpTicker}]") { |
|
| 340 | + } elseif ((string) $nickName === "[{$corpTicker}]") { |
|
| 341 | 341 | $nick = "[{$corpTicker}] {$userName}"; |
| 342 | 342 | } elseif (strpos($nickName, $corpTicker) === false) { |
| 343 | 343 | $nick = "[{$corpTicker}] {$nickName}"; |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | } |
| 353 | 353 | if ($this->nameEnforce === 'true') { |
| 354 | 354 | $nick = "[{$corpTicker}] {$eveName}"; |
| 355 | - } elseif ((string)$nickName === "[{$corpTicker}]") { |
|
| 355 | + } elseif ((string) $nickName === "[{$corpTicker}]") { |
|
| 356 | 356 | $nick = "[{$corpTicker}] {$userName}"; |
| 357 | 357 | } elseif (strpos($nickName, $corpTicker) == false) { |
| 358 | 358 | $nick = "[{$corpTicker}] {$nickName}"; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | //Check if corpID matches |
| 144 | 144 | if ($corpID === $authGroup['corpID']) { |
| 145 | 145 | foreach ($roles as $role) { |
| 146 | - if ((string)$role->name === (string)$authGroup['corpMemberRole']) { |
|
| 146 | + if ((string) $role->name === (string) $authGroup['corpMemberRole']) { |
|
| 147 | 147 | $member->addRole($role); |
| 148 | 148 | $corpRoleSet = 1; |
| 149 | 149 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | //Check if allianceID matches |
| 153 | 153 | if ($allianceID === $authGroup['allianceID'] && $authGroup['allianceID'] != 0) { |
| 154 | 154 | foreach ($roles as $role) { |
| 155 | - if ((string)$role->name === (string)$authGroup['allyMemberRole']) { |
|
| 155 | + if ((string) $role->name === (string) $authGroup['allyMemberRole']) { |
|
| 156 | 156 | $member->addRole($role); |
| 157 | 157 | $allianceRoleSet = 1; |
| 158 | 158 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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'; |