Completed
Push — master ( fd5a8f...ebf9fc )
by Oleg
04:44
created
db/drivers/MysqlDriver.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $sql = 'SHOW TABLES;';
170 170
 
171 171
         if ($this->getDriverType() == 'pgsql') {
172
-            $sql = 'SELECT table_name FROM information_schema.tables WHERE table_schema = \'' . $this->tableSchema . '\'';
172
+            $sql = 'SELECT table_name FROM information_schema.tables WHERE table_schema = \''.$this->tableSchema.'\'';
173 173
         }
174 174
 
175 175
         return $this->conn->query($sql)->fetchAll(\PDO::FETCH_COLUMN, 0);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             foreach ($sth->fetchAll(\PDO::FETCH_ASSOC) as $row) {
228 228
                 $result[] = [
229 229
                     'field' => $row['column_name'],
230
-                    'type' => $row['data_type'] . (($max = $row['character_maximum_length']) ? '(' . $max . ')' : ''),
230
+                    'type' => $row['data_type'].(($max = $row['character_maximum_length']) ? '('.$max.')' : ''),
231 231
                     'null' => $row['is_nullable'],
232 232
                     'default' => $row['column_default']
233 233
                 ];
@@ -278,10 +278,10 @@  discard block
 block discarded – undo
278 278
      */
279 279
     public function insert($table, array $line = [], $multi = false)
280 280
     {
281
-        $fields = '`' . implode('`, `', array_keys($multi ? $line[0] : $line)) . '`';
281
+        $fields = '`'.implode('`, `', array_keys($multi ? $line[0] : $line)).'`';
282 282
 
283 283
         if ($this->getDriverType() === 'pgsql') {
284
-            $fields = '"' . implode('", "', array_keys($multi ? $line[0] : $line)) . '"';
284
+            $fields = '"'.implode('", "', array_keys($multi ? $line[0] : $line)).'"';
285 285
         }
286 286
 
287 287
         $values = ':'.implode(', :', array_keys($multi ? $line[0] : $line));
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
     {
342 342
         $keys = [];
343 343
         foreach ($params AS $key => $val) {
344
-            $keys[] = $table . '.' . $key . '=\'' . $val . '\'';
344
+            $keys[] = $table.'.'.$key.'=\''.$val.'\'';
345 345
         }
346 346
 
347
-        $sth = $this->conn->prepare('SELECT * FROM ' . $table . ' WHERE ' . implode(' AND ', $keys) . ' LIMIT 1;');
347
+        $sth = $this->conn->prepare('SELECT * FROM '.$table.' WHERE '.implode(' AND ', $keys).' LIMIT 1;');
348 348
         /** @noinspection PdoApiUsageInspection */
349 349
         $sth->execute();
350 350
 
Please login to merge, or discard this patch.
db/Connection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         unset($this->driver);
42 42
 
43
-        $class = '\Micro\Db\Drivers\\' . ucfirst(substr($dsn, 0, strpos($dsn, ':'))) . 'Connection';
43
+        $class = '\Micro\Db\Drivers\\'.ucfirst(substr($dsn, 0, strpos($dsn, ':'))).'Connection';
44 44
 
45 45
         $this->driver = new $class($dsn, $config, $options);
46 46
     }
Please login to merge, or discard this patch.