Passed
Pull Request — master (#8)
by Bob
03:01
created
src/plugins/onMessage/corpInfo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             }
95 95
 
96 96
             // Get stats
97
-            $statsURL = 'https://beta.eve-kill.net/api/corpInfo/corporationID/'.urlencode($corpID).'/';
97
+            $statsURL = 'https://beta.eve-kill.net/api/corpInfo/corporationID/' . urlencode($corpID) . '/';
98 98
             $stats = json_decode(downloadData($statsURL), true);
99 99
 
100 100
             if (empty($stats)) {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $memberCount = @$stats['memberArrayCount'];
115 115
             $superCaps = @count($stats['superCaps']);
116 116
             $ePeenSize = @$stats['ePeenSize'];
117
-            $url = 'https://beta.eve-kill.net/corporation/'.@$stats['corporationID'].'/';
117
+            $url = 'https://beta.eve-kill.net/corporation/' . @$stats['corporationID'] . '/';
118 118
 
119 119
 
120 120
             $msg = "```corporationName: {$corporationName}
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         return [
147 147
             'name'        => 'corp',
148
-            'trigger'     => [$this->config['bot']['trigger'].'corp'],
148
+            'trigger'     => [$this->config['bot']['trigger'] . 'corp'],
149 149
             'information' => 'Returns basic EVE Online data about a corporation from projectRena. To use simply type !corp corporation_name',
150 150
         ];
151 151
     }
Please login to merge, or discard this patch.
src/plugins/onMessage/auth.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $result = selectPending($this->db, $this->dbUser, $this->dbPass, $this->dbName, $code);
116 116
 
117 117
             if (strlen($code) < 12) {
118
-                $this->message->reply('Invalid Code, check '.$this->config['bot']['trigger'].'help auth for more info.');
118
+                $this->message->reply('Invalid Code, check ' . $this->config['bot']['trigger'] . 'help auth for more info.');
119 119
 
120 120
                 return;
121 121
             }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                     foreach ($xml->result->rowset->row as $character) {
145 145
                         if ($character->attributes()->name != $userName) {
146 146
                             $this->message->reply('**Failure:** Your discord name must match your character name.');
147
-                            $this->logger->addInfo('User was denied due to not having the correct name '.$character->attributes()->name);
147
+                            $this->logger->addInfo('User was denied due to not having the correct name ' . $character->attributes()->name);
148 148
 
149 149
                             return;
150 150
                         }
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
                                 $member->save();
163 163
                                 insertUser($this->db, $this->dbUser, $this->dbPass, $this->dbName, $userID, $charid, $eveName, 'corp');
164 164
                                 disableReg($this->db, $this->dbUser, $this->dbPass, $this->dbName, $code);
165
-                                $this->message->reply('**Success:** You have now been added to the '.$this->roleName.' group. To get more roles, talk to the CEO / Directors');
166
-                                $this->logger->addInfo('User authed and added to corp group '.$eveName);
165
+                                $this->message->reply('**Success:** You have now been added to the ' . $this->roleName . ' group. To get more roles, talk to the CEO / Directors');
166
+                                $this->logger->addInfo('User authed and added to corp group ' . $eveName);
167 167
 
168 168
                                 return;
169 169
                             }
@@ -179,21 +179,21 @@  discard block
 block discarded – undo
179 179
                                 $member->save();
180 180
                                 insertUser($this->db, $this->dbUser, $this->dbPass, $this->dbName, $userID, $charid, $eveName, 'ally');
181 181
                                 disableReg($this->db, $this->dbUser, $this->dbPass, $this->dbName, $code);
182
-                                $this->message->reply('**Success:** You have now been added to the '.$this->allyroleName.' group. To get more roles, talk to the CEO / Directors');
183
-                                $this->logger->addInfo('User authed and added to the alliance group '.$eveName);
182
+                                $this->message->reply('**Success:** You have now been added to the ' . $this->allyroleName . ' group. To get more roles, talk to the CEO / Directors');
183
+                                $this->logger->addInfo('User authed and added to the alliance group ' . $eveName);
184 184
 
185 185
                                 return;
186 186
                             }
187 187
                         }
188 188
                     }
189 189
                     $this->message->reply('**Failure:** There are no roles available for your corp/alliance.');
190
-                    $this->logger->addInfo('User was denied due to not being in the correct corp or alliance '.$eveName);
190
+                    $this->logger->addInfo('User was denied due to not being in the correct corp or alliance ' . $eveName);
191 191
 
192 192
                     return;
193 193
                 }
194 194
             }
195 195
             $this->message->reply('**Failure:** There was an issue with your code.');
196
-            $this->logger->addInfo('User was denied due to not being in the correct corp or alliance '.$userName);
196
+            $this->logger->addInfo('User was denied due to not being in the correct corp or alliance ' . $userName);
197 197
 
198 198
             return;
199 199
         }
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
     {
207 207
         return [
208 208
             'name'        => 'auth',
209
-            'trigger'     => [$this->config['bot']['trigger'].'auth'],
210
-            'information' => 'SSO based auth system. '.$this->ssoUrl.' Visit the link and login with your main EVE account, select the correct character, and put the !auth <string> you receive in chat.',
209
+            'trigger'     => [$this->config['bot']['trigger'] . 'auth'],
210
+            'information' => 'SSO based auth system. ' . $this->ssoUrl . ' Visit the link and login with your main EVE account, select the correct character, and put the !auth <string> you receive in chat.',
211 211
         ];
212 212
     }
213 213
 
Please login to merge, or discard this patch.
src/plugins/onMessage/price.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
         $systems = dbQuery('SELECT solarSystemName, solarSystemID FROM mapSolarSystems', [], 'ccp');
68 68
         foreach ($systems as $system) {
69 69
             $this->solarSystems[strtolower($system['solarSystemName'])] = $system['solarSystemID'];
70
-            $this->triggers[] = $this->config['bot']['trigger'].strtolower($system['solarSystemName']);
70
+            $this->triggers[] = $this->config['bot']['trigger'] . strtolower($system['solarSystemName']);
71 71
         }
72
-        $this->triggers[] = $this->config['bot']['trigger'].'pc';
72
+        $this->triggers[] = $this->config['bot']['trigger'] . 'pc';
73 73
         $this->excludeChannel = $config['plugins']['priceChecker']['channelID'];
74 74
     }
75 75
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $itemName = $data['messageString'];
114 114
 
115 115
             $single = dbQueryRow('SELECT typeID, typeName FROM invTypes WHERE typeName = :item COLLATE NOCASE', [':item' => ucfirst($itemName)], 'ccp');
116
-            $multiple = dbQuery('SELECT typeID, typeName FROM invTypes WHERE typeName LIKE :item COLLATE NOCASE LIMIT 5', [':item' => '%'.ucfirst($itemName).'%'], 'ccp');
116
+            $multiple = dbQuery('SELECT typeID, typeName FROM invTypes WHERE typeName LIKE :item COLLATE NOCASE LIMIT 5', [':item' => '%' . ucfirst($itemName) . '%'], 'ccp');
117 117
 
118 118
             // Quick lookups
119 119
             if (isset($quickLookUps[$itemName])) {
Please login to merge, or discard this patch.
src/plugins/onMessage/charInfo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
                 return $this->message->reply('**Error:** no data available');
99 99
             }
100 100
             // Get stats
101
-            $statsURL = 'https://beta.eve-kill.net/api/charInfo/characterID/'.urlencode($characterID).'/';
101
+            $statsURL = 'https://beta.eve-kill.net/api/charInfo/characterID/' . urlencode($characterID) . '/';
102 102
             $stats = json_decode(downloadData($statsURL), true);
103 103
 
104 104
             if (empty($stats)) {
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $ePeenSize = @$stats['ePeenSize'];
128 128
             $facepalms = @$stats['facepalms'];
129 129
             $lastUpdated = @$stats['lastUpdatedOnBackend'];
130
-            $url = 'https://beta.eve-kill.net/character/'.$stats['characterID'].'/';
130
+            $url = 'https://beta.eve-kill.net/character/' . $stats['characterID'] . '/';
131 131
 
132 132
 
133 133
             $msg = "```characterName: {$characterName}
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     {
164 164
         return [
165 165
             'name'        => 'char',
166
-            'trigger'     => [$this->config['bot']['trigger'].'char'],
166
+            'trigger'     => [$this->config['bot']['trigger'] . 'char'],
167 167
             'information' => 'Returns basic EVE Online data about a character from projectRena. To use simply type !char character_name',
168 168
         ];
169 169
     }
Please login to merge, or discard this patch.
src/plugins/onMessage/help.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     }
95 95
                 }
96 96
 
97
-                $this->message->reply('Here is a list of plugins available: **'.implode('** |  **', $commands)."** If you'd like help with a specific plugin simply use the command !help <PluginName>");
97
+                $this->message->reply('Here is a list of plugins available: **' . implode('** |  **', $commands) . "** If you'd like help with a specific plugin simply use the command !help <PluginName>");
98 98
             } else {
99 99
                 foreach ($plugins as $plugin) {
100 100
                     if ($messageString == $plugin->information()['name']) {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         return [
114 114
             'name'        => 'help',
115
-            'trigger'     => [$this->config['bot']['trigger'].'help'],
115
+            'trigger'     => [$this->config['bot']['trigger'] . 'help'],
116 116
             'information' => 'Shows help for a plugin, or all the plugins available. Example: **!help pc**',
117 117
         ];
118 118
     }
Please login to merge, or discard this patch.
src/lib/cURL.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         return $result;
50 50
     } catch (Exception $e) {
51
-        var_dump('cURL Error: '.$e->getMessage());
51
+        var_dump('cURL Error: ' . $e->getMessage());
52 52
 
53 53
         return;
54 54
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         return true;
79 79
     } catch (Exception $e) {
80
-        var_dump('Download Error: '.$e->getMessage());
80
+        var_dump('Download Error: ' . $e->getMessage());
81 81
 
82 82
         return false;
83 83
     }
Please login to merge, or discard this patch.
src/lib/eveApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         // Return a new SimpleXMLElement based upon the received data
48 48
         return new SimpleXMLElement($data);
49 49
     } catch (Exception $e) {
50
-        var_dump('EVE API Error: '.$e->getMessage());
50
+        var_dump('EVE API Error: ' . $e->getMessage());
51 51
 
52 52
         return;
53 53
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         //If server is up return true
82 82
         return $true;
83 83
     } catch (Exception $e) {
84
-        var_dump('EVE API Error: '.$e->getMessage());
84
+        var_dump('EVE API Error: ' . $e->getMessage());
85 85
 
86 86
         return;
87 87
     }
Please login to merge, or discard this patch.
src/lib/updateCCPData.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 {
33 33
     $ccpDataURL = 'https://mambaonline.org/bot/sqlite-latest.sqlite.bz2';
34 34
     $ccpDataMD5URL = 'https://mambaonline.org/bot/sqlite-latest.sqlite.bz2.md5';
35
-    $databaseDir = __DIR__.'/../../database/';
35
+    $databaseDir = __DIR__ . '/../../database/';
36 36
     $md5 = explode(' ', downloadData($ccpDataMD5URL))[0];
37 37
     $lastSeenMD5 = getPermCache('CCPDataMD5');
38 38
     $lastChecked = getPermCache('CCPDataLastAttempt');
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
             file_put_contents("{$databaseDir}/ccpData.sqlite", $data);
63 63
             $logger->addInfo('Flushing bz2 data from memory');
64 64
             $data = null;
65
-            $logger->addInfo('Memory in use: '.memory_get_usage() / 1024 / 1024 .'MB');
65
+            $logger->addInfo('Memory in use: ' . memory_get_usage() / 1024 / 1024 . 'MB');
66 66
             gc_collect_cycles(); // Collect garbage
67
-            $logger->addInfo('Memory in use after garbage collection: '.memory_get_usage() / 1024 / 1024 .'MB');
67
+            $logger->addInfo('Memory in use after garbage collection: ' . memory_get_usage() / 1024 / 1024 . 'MB');
68 68
             $logger->addInfo('Deleting bz2 file');
69 69
             unlink("{$databaseDir}/ccpData.sqlite.bz2");
70 70
             setPermCache('CCPDataMD5', $md5);
Please login to merge, or discard this patch.
src/lib/updateDramielDB.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,8 @@
 block discarded – undo
81 81
     ];
82 82
 
83 83
     // Does the file exist?
84
-    if (!file_exists(__DIR__.'/../../database/dramiel.sqlite')) {
85
-        touch(__DIR__.'/../../database/dramiel.sqlite');
84
+    if (!file_exists(__DIR__ . '/../../database/dramiel.sqlite')) {
85
+        touch(__DIR__ . '/../../database/dramiel.sqlite');
86 86
     }
87 87
 
88 88
     // Create table if not exists
Please login to merge, or discard this patch.