@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @var array |
23 | 23 | */ |
24 | - private $types = [ //! arrays |
|
24 | + private $types = [//! arrays |
|
25 | 25 | 'Numbers' => ["integer" => 0, "real" => 0, "numeric" => 0], |
26 | 26 | 'Strings' => ["text" => 0], |
27 | 27 | 'Binary' => ["blob" => 0], |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | private $editFunctions = [[ |
65 | 65 | // "text" => "date('now')/time('now')/datetime('now')", |
66 | - ],[ |
|
66 | + ], [ |
|
67 | 67 | "integer|real|numeric" => "+/-", |
68 | 68 | // "text" => "date/time/datetime", |
69 | 69 | "text" => "||", |
@@ -42,7 +42,7 @@ |
||
42 | 42 | if ($name == '') { |
43 | 43 | continue; |
44 | 44 | } |
45 | - $columns = implode(", ", array_map(function ($key) { |
|
45 | + $columns = implode(", ", array_map(function($key) { |
|
46 | 46 | return $this->escapeId($key); |
47 | 47 | }, $index->columns)); |
48 | 48 | $query .= ";\n\n" . $this->sqlForCreateIndex($table, $index->type, $name, "($columns)"); |
@@ -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->limit($query, $where, 1, 0) : |
|
19 | - //! use primary key in tables with WITHOUT rowid |
|
18 | + $this->driver->limit($query, $where, 1, 0) : //! use primary key in tables with WITHOUT rowid |
|
20 | 19 | " $query WHERE rowid = (SELECT rowid FROM " . $this->driver->table($table) . $where . ' LIMIT 1)'; |
21 | 20 | } |
22 | 21 |
@@ -123,7 +123,7 @@ |
||
123 | 123 | foreach (array_reverse($alter) as $index) { |
124 | 124 | // Can't alter primary keys |
125 | 125 | if ($index->type !== 'PRIMARY') { |
126 | - $queries[] = $this->driver->sqlForCreateIndex($table, $index->type, |
|
126 | + $queries[] = $this->driver->sqlForCreateIndex($table, $index->type, |
|
127 | 127 | $index->name, '(' . implode(', ', $index->columns) . ')'); |
128 | 128 | } |
129 | 129 | } |
@@ -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 | } |