Passed
Branch master (fe8497)
by
unknown
03:48
created
Dramiel.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 
29 29
 // Setup logger
30 30
 use Discord\Discord;
31
-use Discord\Parts\User\Game;
32 31
 use Discord\WebSockets\Event;
33 32
 use Discord\WebSockets\WebSocket;
34 33
 use Monolog\Handler\StreamHandler;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 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(5, function () use ($pluginsT) {
139
+        $discord->loop->addPeriodicTimer(5, 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) {
146
+        $discord->loop->addPeriodicTimer(15, function() use ($discord) {
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
                 $channel->sendMessage($queuedMessage['message'], false);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         });
161 161
 
162 162
         // Mem cleanup every 30 minutes
163
-        $discord->loop->addPeriodicTimer(1800, function () use ($logger) {
163
+        $discord->loop->addPeriodicTimer(1800, function() use ($logger) {
164 164
             $logger->addInfo("Memory in use: " . memory_get_usage() / 1024 / 1024 . "MB");
165 165
             gc_collect_cycles(); // Collect garbage
166 166
             $logger->addInfo("Memory in use after garbage collection: " . memory_get_usage() / 1024 / 1024 . "MB");
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
         $discord->on(
170 170
             Event::MESSAGE_CREATE,
171
-            function ($message) use ($logger, $config, $plugins) {
171
+            function($message) use ($logger, $config, $plugins) {
172 172
 
173 173
                 $msgData = array(
174 174
                     "message" => array(
@@ -209,19 +209,19 @@  discard block
 block discarded – undo
209 209
 );
210 210
 $discord->on(
211 211
     'error',
212
-    function ($error) use ($logger) {
212
+    function($error) use ($logger) {
213 213
         $logger->addError($error);
214 214
         exit(1);
215 215
     }
216 216
 );
217 217
 $discord->on(
218 218
     'reconnecting',
219
-    function () use ($logger) {
219
+    function() use ($logger) {
220 220
         $logger->addInfo('Websocket is reconnecting..');
221 221
     });
222 222
 $discord->on(
223 223
     'reconnected',
224
-    function () use ($logger) {
224
+    function() use ($logger) {
225 225
         $logger->addInfo('Websocket was reconnected..');
226 226
     });
227 227
 // 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
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $lastChecked = getPermCache("killmailCheck");
92 92
         if ($lastChecked <= time()) {
93 93
             //check if user is still using the old config
94
-            if(is_null($this->groupConfig)){
94
+            if (is_null($this->groupConfig)) {
95 95
                 $this->logger->addError("Killmails: UPDATE YOUR CONFIG TO RECEIVE KILLMAILS");
96 96
                 setPermCache("killmailCheck", time() + 900);
97 97
                 return null;
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 
106 106
     function getKM()
107 107
     {
108
-        foreach($this->groupConfig as $kmGroup) {
108
+        foreach ($this->groupConfig as $kmGroup) {
109 109
             $lastMail = getPermCache("{$kmGroup["name"]}newestKillmailID");
110
-            if (is_null($lastMail)){
110
+            if (is_null($lastMail)) {
111 111
                 $lastMail = $kmGroup["startMail"];
112 112
             }
113 113
             if ($kmGroup["allianceID"] == "0" & $kmGroup["lossMails"] == 'true') {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                 foreach ($xml as $kill) {
136 136
                     if ($i < $limit) {
137 137
                         //if big kill isn't set, disable it
138
-                        if (is_null($kmGroup["bigKill"])){
138
+                        if (is_null($kmGroup["bigKill"])) {
139 139
                             $kmGroup["bigKill"] = 99999999999999999999999999;
140 140
                         }
141 141
                         $killID = $kill['killID'];
Please login to merge, or discard this patch.
src/plugins/onMessage/fleetUpOps.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     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
         {
Please login to merge, or discard this patch.