Passed
Push — main ( 667f12...2d9659 )
by Thierry
04:03 queued 02:06
created
src/Db/Query.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function insert(string $table, array $set)
18 18
     {
19
-        return ($set ? parent::insert($table, $set) :
20
-            $this->execute("INSERT INTO " . $this->driver->table($table) . " ()\nVALUES ()"));
19
+        return ($set ? parent::insert($table, $set) : $this->execute("INSERT INTO " . $this->driver->table($table) . " ()\nVALUES ()"));
21 20
     }
22 21
 
23 22
     /**
Please login to merge, or discard this patch.
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
-        return $this->driver->execute("DROP VIEW " . implode(", ", array_map(function ($view) {
113
+        return $this->driver->execute("DROP VIEW " . implode(", ", array_map(function($view) {
116 114
             return $this->driver->table($view);
117 115
         }, $views)));
118 116
     }
@@ -122,7 +120,7 @@  discard block
 block discarded – undo
122 120
      */
123 121
     public function dropTables(array $tables)
124 122
     {
125
-        return $this->driver->execute("DROP TABLE " . implode(", ", array_map(function ($table) {
123
+        return $this->driver->execute("DROP TABLE " . implode(", ", array_map(function($table) {
126 124
             return $this->driver->table($table);
127 125
         }, $tables)));
128 126
     }
@@ -238,7 +236,7 @@  discard block
 block discarded – undo
238 236
      */
239 237
     public function dropDatabases(array $databases)
240 238
     {
241
-        return $this->driver->applyQueries("DROP DATABASE", $databases, function ($database) {
239
+        return $this->driver->applyQueries("DROP DATABASE", $databases, function($database) {
242 240
             return $this->driver->escapeId($database);
243 241
         });
244 242
     }
Please login to merge, or discard this patch.