Passed
Push — master ( 7c7d88...5359ca )
by Bob
03:13 queued 30s
created
Dramiel.php 2 patches
Unused Use Statements   -7 removed lines patch added patch discarded remove patch
@@ -67,15 +67,8 @@
 block discarded – undo
67 67
 updateCCPData($logger);
68 68
 
69 69
 // Init Discord
70
-use Discord\Cache\Cache;
71
-use Discord\Cache\Drivers\ArrayCacheDriver;
72 70
 use Discord\Discord;
73
-use Discord\Parts\Channel\Message;
74
-use Discord\Parts\Channel\Channel;
75
-use Discord\Parts\Guild\Guild;
76 71
 use Discord\Parts\User\Game;
77
-use Discord\Parts\User\Member;
78
-use Discord\Parts\WebSockets\PresenceUpdate;
79 72
 use Discord\WebSockets\Event;
80 73
 use Discord\WebSockets\WebSocket;
81 74
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,8 +148,9 @@
 block discarded – undo
148 148
         
149 149
         // Run the Tick plugins
150 150
         $ws->loop->addPeriodicTimer(1, function () use ($pluginsT) {
151
-            foreach ($pluginsT as $plugin)
152
-                $plugin->tick();
151
+            foreach ($pluginsT as $plugin) {
152
+                            $plugin->tick();
153
+            }
153 154
         });
154 155
 
155 156
         // Mem cleanup every 30 minutes
Please login to merge, or discard this patch.
src/plugins/onMessage/auth.php 1 patch
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -23,11 +23,6 @@
 block discarded – undo
23 23
  * SOFTWARE.
24 24
  */
25 25
 
26
-use Discord\Discord;
27
-use Discord\Parts\Channel\Message;
28
-use Discord\Parts\Guild\Guild;
29
-use Discord\Parts\User\Member;
30
-
31 26
 /**
32 27
  * Class auth
33 28
  * @property  message
Please login to merge, or discard this patch.
src/plugins/onMessage/charInfo.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
  */
25 25
 
26 26
 use Discord\Discord;
27
-use Discord\Parts\Channel\Message;
28 27
 
29 28
 /**
30 29
  * @property  message
Please login to merge, or discard this patch.
src/plugins/onMessage/time.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,6 @@
 block discarded – undo
23 23
  * SOFTWARE.
24 24
  */
25 25
 
26
-use Discord\Discord;
27
-use Discord\Parts\Channel\Message;
28
-
29 26
 /**
30 27
  * Class time
31 28
  * @property  message
Please login to merge, or discard this patch.
src/plugins/onTick/authCheck.php 1 patch
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -23,11 +23,7 @@
 block discarded – undo
23 23
  * SOFTWARE.
24 24
  */
25 25
 
26
-use Discord\Discord;
27
-use Discord\Parts\Channel\Message;
28 26
 use Discord\Parts\Channel\Channel;
29
-use Discord\Parts\User\User;
30
-use Discord\WebSockets\Event;
31 27
 
32 28
 /**
33 29
  * Class fileAuthCheck
Please login to merge, or discard this patch.
src/plugins/onTick/notifications.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
  */
25 25
 
26 26
 
27
-use Discord\Discord;
28 27
 use Discord\Parts\Channel\Message;
29 28
 use Discord\Parts\Channel\Channel;
30 29
 
Please login to merge, or discard this patch.
src/plugins/onTick/twitterOutput.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,6 @@
 block discarded – undo
23 23
  * SOFTWARE.
24 24
  */
25 25
 
26
-use Discord\Discord;
27
-use Discord\Parts\Channel\Message;
28 26
 use Discord\Parts\Channel\Channel;
29 27
 
30 28
 /**
Please login to merge, or discard this patch.
src/lib/Db.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
  */
25 25
 
26 26
 /**
27
- * @param null $db
27
+ * @param string|null $db
28 28
  * @return null|PDO
29 29
  */
30 30
 function openDB($db = null)
Please login to merge, or discard this patch.
Braces   +24 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,10 +29,12 @@  discard block
 block discarded – undo
29 29
  */
30 30
 function openDB($db = null)
31 31
 {
32
-    if ($db == null)
33
-        $db = __DIR__ . "/../../database/dramiel.sqlite";
34
-    if ($db == "ccp")
35
-        $db = __DIR__ . "/../../database/ccpData.sqlite";
32
+    if ($db == null) {
33
+            $db = __DIR__ . "/../../database/dramiel.sqlite";
34
+    }
35
+    if ($db == "ccp") {
36
+            $db = __DIR__ . "/../../database/ccpData.sqlite";
37
+    }
36 38
 
37 39
     $dsn = "sqlite:$db";
38 40
     try {
@@ -62,8 +64,9 @@  discard block
 block discarded – undo
62 64
 function dbQueryField($query, $field, $params = array(), $db = null)
63 65
 {
64 66
     $pdo = openDB($db);
65
-    if ($pdo == NULL)
66
-        return null;
67
+    if ($pdo == NULL) {
68
+            return null;
69
+    }
67 70
 
68 71
     $stmt = $pdo->prepare($query);
69 72
     $stmt->execute($params);
@@ -72,7 +75,9 @@  discard block
 block discarded – undo
72 75
     $stmt->closeCursor();
73 76
     $pdo = null;
74 77
 
75
-    if (sizeof($result) == 0) return null;
78
+    if (sizeof($result) == 0) {
79
+        return null;
80
+    }
76 81
 
77 82
     $resultRow = $result[0];
78 83
     return $resultRow[$field];
@@ -87,8 +92,9 @@  discard block
 block discarded – undo
87 92
 function dbQueryRow($query, $params = array(), $db = null)
88 93
 {
89 94
     $pdo = openDB($db);
90
-    if ($pdo == NULL)
91
-        return null;
95
+    if ($pdo == NULL) {
96
+            return null;
97
+    }
92 98
 
93 99
     $stmt = $pdo->prepare($query);
94 100
     $stmt->execute($params);
@@ -97,7 +103,9 @@  discard block
 block discarded – undo
97 103
     $stmt->closeCursor();
98 104
     $pdo = null;
99 105
 
100
-    if (sizeof($result) >= 1) return $result[0];
106
+    if (sizeof($result) >= 1) {
107
+        return $result[0];
108
+    }
101 109
     return null;
102 110
 }
103 111
 
@@ -110,8 +118,9 @@  discard block
 block discarded – undo
110 118
 function dbQuery($query, $params = array(), $db = null)
111 119
 {
112 120
     $pdo = openDB($db);
113
-    if ($pdo == NULL)
114
-        return null;
121
+    if ($pdo == NULL) {
122
+            return null;
123
+    }
115 124
 
116 125
     $stmt = $pdo->prepare($query);
117 126
     $stmt->execute($params);
@@ -131,8 +140,9 @@  discard block
 block discarded – undo
131 140
 function dbExecute($query, $params = array(), $db = null)
132 141
 {
133 142
     $pdo = openDB($db);
134
-    if ($pdo == NULL)
135
-        return;
143
+    if ($pdo == NULL) {
144
+            return;
145
+    }
136 146
 
137 147
     // This is ugly, but, yeah..
138 148
     if (stristr($query, ";")) {
Please login to merge, or discard this patch.
src/plugins/onMessage/about.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -23,9 +23,6 @@
 block discarded – undo
23 23
  * SOFTWARE.
24 24
  */
25 25
 
26
-use Discord\Discord;
27
-use Discord\Parts\Channel\Message;
28
-
29 26
 /**
30 27
  * Class time
31 28
  * @property  message
Please login to merge, or discard this patch.