Passed
Push — main ( 0ad8f5...e78d26 )
by Thierry
28:37 queued 19:50
created
src/Db/DatabaseTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Db/Server.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Driver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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" => "||",
Please login to merge, or discard this patch.
src/Db/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
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
         }
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
@@ -15,8 +15,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Db/Grammar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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)");
Please login to merge, or discard this patch.