Passed
Branch master (29155b)
by
unknown
03:29
created
Dramiel.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
 $discord->on(
123 123
     'ready',
124
-    function ($discord) use ($logger, $config, $plugins, $pluginsT, $discord) {
124
+    function($discord) use ($logger, $config, $plugins, $pluginsT, $discord) {
125 125
         // In here we can access any of the WebSocket events.
126 126
         //
127 127
         // There is a list of event constants that you can
@@ -131,25 +131,25 @@  discard block
 block discarded – undo
131 131
         $logger->addInfo('Discord WebSocket is ready!' . PHP_EOL);
132 132
 
133 133
         // Database check
134
-        $discord->loop->addPeriodicTimer(86400, function () use ($logger) {
134
+        $discord->loop->addPeriodicTimer(86400, function() use ($logger) {
135 135
             updateDramielDB($logger);
136 136
         });
137 137
 
138 138
         // Run the Tick plugins
139
-        $discord->loop->addPeriodicTimer(3, function () use ($pluginsT) {
139
+        $discord->loop->addPeriodicTimer(3, function() use ($pluginsT) {
140 140
             foreach ($pluginsT as $plugin) {
141 141
                 $plugin->tick();
142 142
             }
143 143
         });
144 144
 
145 145
         // Message queue
146
-        $discord->loop->addPeriodicTimer(15, function () use ($discord,$logger) {
146
+        $discord->loop->addPeriodicTimer(15, function() use ($discord, $logger) {
147 147
             $id = getPermCache("messageQueueID");
148
-            if(is_null($id)){
148
+            if (is_null($id)) {
149 149
                 $id = 1;
150 150
             }
151 151
             $queuedMessage = getQueuedMessage($id);
152
-            if(!is_null($queuedMessage)){
152
+            if (!is_null($queuedMessage)) {
153 153
                 $guild = $discord->guilds->get('id', $queuedMessage['guild']);
154 154
                 $channel = $guild->channels->get('id', $queuedMessage['channel']);
155 155
                 $logger->addInfo("QueueProcessing - Completing queued item #{$id} : {$queuedMessage['message']}");
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 //clearQueuedMessages($id); bugtest me
160 160
             }
161 161
             $queuedMessage = getQueuedMessage($id);
162
-            if(!is_null($queuedMessage)){
162
+            if (!is_null($queuedMessage)) {
163 163
                 $guild = $discord->guilds->get('id', $queuedMessage['guild']);
164 164
                 $channel = $guild->channels->get('id', $queuedMessage['channel']);
165 165
                 $logger->addInfo("QueueProcessing - Completing queued item #{$id} : {$queuedMessage['message']}");
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         });
172 172
 
173 173
         // Mem cleanup every 30 minutes
174
-        $discord->loop->addPeriodicTimer(1800, function () use ($logger) {
174
+        $discord->loop->addPeriodicTimer(1800, function() use ($logger) {
175 175
             $logger->addInfo("Memory in use: " . memory_get_usage() / 1024 / 1024 . "MB");
176 176
             gc_collect_cycles(); // Collect garbage
177 177
             $logger->addInfo("Memory in use after garbage collection: " . memory_get_usage() / 1024 / 1024 . "MB");
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 
180 180
         $discord->on(
181 181
             Event::MESSAGE_CREATE,
182
-            function ($message) use ($logger, $config, $plugins) {
182
+            function($message) use ($logger, $config, $plugins) {
183 183
 
184 184
                 $msgData = array(
185 185
                     "message" => array(
@@ -220,19 +220,19 @@  discard block
 block discarded – undo
220 220
 );
221 221
 $discord->on(
222 222
     'error',
223
-    function ($error) use ($logger) {
223
+    function($error) use ($logger) {
224 224
         $logger->addError($error);
225 225
         exit(1);
226 226
     }
227 227
 );
228 228
 $discord->on(
229 229
     'reconnecting',
230
-    function () use ($logger) {
230
+    function() use ($logger) {
231 231
         $logger->addInfo('Websocket is reconnecting..');
232 232
     });
233 233
 $discord->on(
234 234
     'reconnected',
235
-    function () use ($logger) {
235
+    function() use ($logger) {
236 236
         $logger->addInfo('Websocket was reconnected..');
237 237
     });
238 238
 // Now we will run the ReactPHP Event Loop!
Please login to merge, or discard this patch.
src/plugins/onTick/getKillmails.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $this->groupConfig = $config["plugins"]["getKillmails"]["groupConfig"];
70 70
         $this->guild = $config["bot"]["guild"];
71 71
         //Refresh check at bot start
72
-        setPermCache("killmailCheck",  time() - 5);
72
+        setPermCache("killmailCheck", time() - 5);
73 73
     }
74 74
 
75 75
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $lastChecked = getPermCache("killmailCheck");
94 94
         if ($lastChecked <= time()) {
95 95
             //check if user is still using the old config
96
-            if(is_null($this->groupConfig)){
96
+            if (is_null($this->groupConfig)) {
97 97
                 $this->logger->addError("Killmails: UPDATE YOUR CONFIG TO RECEIVE KILLMAILS");
98 98
                 setPermCache("killmailCheck", time() + 600);
99 99
                 return null;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
     function getKM()
109 109
     {
110
-        foreach($this->groupConfig as $kmGroup) {
110
+        foreach ($this->groupConfig as $kmGroup) {
111 111
             $lastMail = getPermCache("{$kmGroup["name"]}newestKillmailID");
112 112
             //check if start id is greater than current id and if it is set
113 113
             if ($kmGroup["startMail"] > $lastMail || is_null($lastMail)) {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
                 foreach ($xml as $kill) {
139 139
                     if ($i < $limit) {
140 140
                         //if big kill isn't set, disable it
141
-                        if (is_null($kmGroup["bigKill"])){
141
+                        if (is_null($kmGroup["bigKill"])) {
142 142
                             $kmGroup["bigKill"] = 99999999999999999999999999;
143 143
                         }
144 144
                         $killID = $kill['killID'];
Please login to merge, or discard this patch.
src/plugins/onTick/notifications.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
         $this->characterID = $config["eve"]["apiKeys"]["user1"]["characterID"];
111 111
         $this->guild = $config["bot"]["guild"];
112 112
         //Refresh check at bot start
113
-        setPermCache("notificationsLastChecked{$this->keyID}",  time() - 5);
113
+        setPermCache("notificationsLastChecked{$this->keyID}", time() - 5);
114 114
         if (is_null($this->allianceOnly)) {
115 115
             $this->allianceOnly = "false";
116 116
         }
Please login to merge, or discard this patch.
src/plugins/onTick/siphons.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         $this->vCode = $config["plugins"]["siphons"]["vCode"];
68 68
         $this->prefix = $config["plugins"]["siphons"]["prefix"];
69 69
         //Refresh check at bot start
70
-        setPermCache("siphonLastChecked{$this->keyID}",  time() - 5);
70
+        setPermCache("siphonLastChecked{$this->keyID}", time() - 5);
71 71
     }
72 72
 
73 73
     /**
Please login to merge, or discard this patch.
src/plugins/onTick/evemails.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
         $this->characterID = $config["eve"]["apiKeys"]["user1"]["characterID"];
100 100
         $this->nextCheck = 0;
101 101
         //Refresh check at bot start
102
-        setPermCache("mailLastChecked{$this->keyID}",  time() - 5);
102
+        setPermCache("mailLastChecked{$this->keyID}", time() - 5);
103 103
     }
104 104
 
105 105
     /**
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
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         $this->guild = $config["bot"]["guild"];
64 64
         $this->toDiscordChannel = $config["plugins"]["notifications"]["channelID"];
65 65
         //Refresh check at bot start
66
-        setPermCache("statusLastChecked",  time() - 5);
66
+        setPermCache("statusLastChecked", time() - 5);
67 67
     }
68 68
 
69 69
     /**
Please login to merge, or discard this patch.