Passed
Push — main ( 1130cd...e96663 )
by Thierry
04:33 queued 02:34
created
src/Db/Table.php 1 patch
Spacing   +5 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
         $query = ($fast && $this->driver->minVersion(5)) ?
26 26
             "SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment " .
27 27
             "FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " .
28
-            ($table != "" ? "AND TABLE_NAME = " . $this->driver->quote($table) : "ORDER BY Name") :
29
-            "SHOW TABLE STATUS" . ($table != "" ? " LIKE " . $this->driver->quote(addcslashes($table, "%_\\")) : "");
28
+            ($table != "" ? "AND TABLE_NAME = " . $this->driver->quote($table) : "ORDER BY Name") : "SHOW TABLE STATUS" . ($table != "" ? " LIKE " . $this->driver->quote(addcslashes($table, "%_\\")) : "");
30 29
         return $this->driver->rows($query);
31 30
     }
32 31
 
@@ -142,8 +141,7 @@  discard block
 block discarded – undo
142 141
             $index = new IndexEntity();
143 142
 
144 143
             $name = $row["Key_name"];
145
-            $index->type = ($name == "PRIMARY" ? "PRIMARY" :
146
-                ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ?
144
+            $index->type = ($name == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ?
147 145
                 ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
148 146
             $index->columns[] = $row["Column_name"];
149 147
             $index->lengths[] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
@@ -183,10 +181,10 @@  discard block
 block discarded – undo
183 181
 
184 182
                 $foreignKey->database = $this->driver->unescapeId($match4 != "" ? $match3 : $match4);
185 183
                 $foreignKey->table = $this->driver->unescapeId($match4 != "" ? $match4 : $match3);
186
-                $foreignKey->source = array_map(function ($idf) {
184
+                $foreignKey->source = array_map(function($idf) {
187 185
                     return $this->driver->unescapeId($idf);
188 186
                 }, $source[0]);
189
-                $foreignKey->target = array_map(function ($idf) {
187
+                $foreignKey->target = array_map(function($idf) {
190 188
                     return $this->driver->unescapeId($idf);
191 189
                 }, $target[0]);
192 190
                 $foreignKey->onDelete = $matchCount > 6 ? $match[6] : "RESTRICT";
@@ -208,8 +206,7 @@  discard block
 block discarded – undo
208 206
         foreach ($fields as $field) {
209 207
             $alter[] = ($field[1] ? ($table != "" ? ($field[0] != "" ? "CHANGE " .
210 208
                 $this->driver->escapeId($field[0]) : "ADD") : " ") . " " .
211
-                implode($field[1]) . ($table != "" ? $field[2] : "") :
212
-                "DROP " . $this->driver->escapeId($field[0])
209
+                implode($field[1]) . ($table != "" ? $field[2] : "") : "DROP " . $this->driver->escapeId($field[0])
213 210
             );
214 211
         }
215 212
         $alter = array_merge($alter, $foreign);
Please login to merge, or discard this patch.
src/Db/Query.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function insert(string $table, array $set)
25 25
     {
26
-        return ($set ? parent::insert($table, $set) :
27
-            $this->execute('INSERT INTO ' . $this->driver->table($table) . ' () VALUES ()'));
26
+        return ($set ? parent::insert($table, $set) : $this->execute('INSERT INTO ' . $this->driver->table($table) . ' () VALUES ()'));
28 27
     }
29 28
 
30 29
     /**
Please login to merge, or discard this patch.