@@ -52,7 +52,7 @@ |
||
52 | 52 | $clauses = []; |
53 | 53 | foreach ($tableAttrs->fields as $field) { |
54 | 54 | if ($field[1]) { |
55 | - $clauses[] = ($field[0] != '' ? $field[1] : 'ADD ' . implode($field[1])); |
|
55 | + $clauses[] = ($field[0] != '' ? $field[1] : 'ADD ' . implode($field[1])); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | return $clauses; |
@@ -49,10 +49,10 @@ |
||
49 | 49 | $directory = $this->directory($this->driver->options()); |
50 | 50 | $iterator = new DirectoryIterator($directory); |
51 | 51 | // Iterate on dir content |
52 | - foreach($iterator as $file) |
|
52 | + foreach ($iterator as $file) |
|
53 | 53 | { |
54 | 54 | // Skip everything except Sqlite files |
55 | - if(!$file->isFile() || !$this->validateName($filename = $file->getFilename())) |
|
55 | + if (!$file->isFile() || !$this->validateName($filename = $file->getFilename())) |
|
56 | 56 | { |
57 | 57 | continue; |
58 | 58 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | // Init config |
19 | 19 | $this->config->jush = 'sqlite'; |
20 | 20 | $this->config->drivers = ["SQLite3", "PDO_SQLite"]; |
21 | - $this->config->setTypes([ //! arrays |
|
21 | + $this->config->setTypes([//! arrays |
|
22 | 22 | 'Numbers' => ["integer" => 0, "real" => 0, "numeric" => 0], |
23 | 23 | 'Strings' => ["text" => 0], |
24 | 24 | 'Binary' => ["blob" => 0], |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $this->config->grouping = ["avg", "count", "count distinct", "group_concat", "max", "min", "sum"]; |
31 | 31 | $this->config->editFunctions = [[ |
32 | 32 | // "text" => "date('now')/time('now')/datetime('now')", |
33 | - ],[ |
|
33 | + ], [ |
|
34 | 34 | "integer|real|numeric" => "+/-", |
35 | 35 | // "text" => "date/time/datetime", |
36 | 36 | "text" => "||", |
@@ -124,7 +124,7 @@ |
||
124 | 124 | foreach (array_reverse($alter) as $index) { |
125 | 125 | // Can't alter primary keys |
126 | 126 | if ($index->type !== 'PRIMARY') { |
127 | - $queries[] = $this->driver->getCreateIndexQuery($table, $index->type, |
|
127 | + $queries[] = $this->driver->getCreateIndexQuery($table, $index->type, |
|
128 | 128 | $index->name, '(' . implode(', ', $index->columns) . ')'); |
129 | 129 | } |
130 | 130 | } |
@@ -15,8 +15,7 @@ |
||
15 | 15 | { |
16 | 16 | return preg_match('~^INTO~', $query) || |
17 | 17 | $this->driver->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')") ? |
18 | - $this->driver->getLimitClause($query, $where, 1, 0) : |
|
19 | - //! use primary key in tables with WITHOUT rowid |
|
18 | + $this->driver->getLimitClause($query, $where, 1, 0) : //! use primary key in tables with WITHOUT rowid |
|
20 | 19 | " $query WHERE rowid = (SELECT rowid FROM " . $this->driver->escapeTableName($table) . $where . ' LIMIT 1)'; |
21 | 20 | } |
22 | 21 |
@@ -33,7 +33,7 @@ |
||
33 | 33 | if ($name == '') { |
34 | 34 | continue; |
35 | 35 | } |
36 | - $columns = implode(", ", array_map(function ($key) { |
|
36 | + $columns = implode(", ", array_map(function($key) { |
|
37 | 37 | return $this->escapeId($key); |
38 | 38 | }, $index->columns)); |
39 | 39 | $query .= ";\n\n" . $this->getCreateIndexQuery($table, $index->type, $name, "($columns)"); |