Passed
Push — main ( e96663...f418cb )
by Thierry
02:57 queued 01:24
created
src/Db/Server.php 1 patch
Spacing   +5 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@  discard block
 block discarded – undo
15 15
     {
16 16
         // !!! Caching and slow query handling are temporarily disabled !!!
17 17
         $query = $this->driver->minVersion(5) ?
18
-            "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA ORDER BY SCHEMA_NAME" :
19
-            "SHOW DATABASES";
18
+            "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA ORDER BY SCHEMA_NAME" : "SHOW DATABASES";
20 19
         return $this->driver->values($query);
21 20
 
22 21
         // SHOW DATABASES can take a very long time so it is cached
@@ -91,8 +90,7 @@  discard block
 block discarded – undo
91 90
     public function tables()
92 91
     {
93 92
         return $this->driver->keyValues($this->driver->minVersion(5) ?
94
-            "SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME" :
95
-            "SHOW TABLES");
93
+            "SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME" : "SHOW TABLES");
96 94
     }
97 95
 
98 96
     /**
@@ -112,7 +110,7 @@  discard block
 block discarded – undo
112 110
      */
113 111
     public function dropViews(array $views)
114 112
     {
115
-        $this->driver->execute("DROP VIEW " . implode(", ", array_map(function ($view) {
113
+        $this->driver->execute("DROP VIEW " . implode(", ", array_map(function($view) {
116 114
             return $this->driver->table($view);
117 115
         }, $views)));
118 116
         return true;
@@ -123,7 +121,7 @@  discard block
 block discarded – undo
123 121
      */
124 122
     public function dropTables(array $tables)
125 123
     {
126
-        $this->driver->execute("DROP TABLE " . implode(", ", array_map(function ($table) {
124
+        $this->driver->execute("DROP TABLE " . implode(", ", array_map(function($table) {
127 125
             return $this->driver->table($table);
128 126
         }, $tables)));
129 127
         return true;
@@ -241,7 +239,7 @@  discard block
 block discarded – undo
241 239
      */
242 240
     public function dropDatabases(array $databases)
243 241
     {
244
-        return $this->driver->applyQueries("DROP DATABASE", $databases, function ($database) {
242
+        return $this->driver->applyQueries("DROP DATABASE", $databases, function($database) {
245 243
             return $this->driver->escapeId($database);
246 244
         });
247 245
     }
Please login to merge, or discard this patch.