Passed
Branch main (4c0377)
by Thierry
03:21
created
src/Driver.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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" => "||",
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,11 +84,9 @@
 block discarded – undo
84 84
     {
85 85
         if (class_exists("SQLite3")) {
86 86
             $connection = new Db\Sqlite\Connection($this, $this->util, $this->trans, 'SQLite3');
87
-        }
88
-        elseif (extension_loaded("pdo_sqlite")) {
87
+        } elseif (extension_loaded("pdo_sqlite")) {
89 88
             $connection = new Db\Pdo\Connection($this, $this->util, $this->trans, 'PDO_SQLite');
90
-        }
91
-        else {
89
+        } else {
92 90
             throw new AuthException($this->trans->lang('No package installed to open a Sqlite database.'));
93 91
         }
94 92
 
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
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
         $directory = rtrim($this->driver->options('directory'), '/\\');
28 28
         $iterator = new DirectoryIterator($directory);
29 29
         // Iterate on dir content
30
-        foreach($iterator as $file)
30
+        foreach ($iterator as $file)
31 31
         {
32 32
             // Skip everything except Sqlite files
33
-            if(!$file->isFile() || !$this->validateName($filename = $file->getFilename()))
33
+            if (!$file->isFile() || !$this->validateName($filename = $file->getFilename()))
34 34
             {
35 35
                 continue;
36 36
             }
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
@@ -42,7 +42,7 @@
 block discarded – undo
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)");
Please login to merge, or discard this patch.
src/Db/Database.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $clauses = [];
119 119
         foreach ($tableAttrs->fields as $field) {
120 120
             if ($field[1]) {
121
-                $clauses[] = ($field[0] != ''  ? $field[1] : 'ADD ' . implode($field[1]));
121
+                $clauses[] = ($field[0] != '' ? $field[1] : 'ADD ' . implode($field[1]));
122 122
             }
123 123
         }
124 124
         $queries = [];
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         foreach (array_reverse($alter) as $index) {
152 152
             // Can't alter primary keys
153 153
             if ($index->type !== 'PRIMARY') {
154
-                $queries[] =  $this->driver->sqlForCreateIndex($table, $index->type,
154
+                $queries[] = $this->driver->sqlForCreateIndex($table, $index->type,
155 155
                     $index->name, '(' . implode(', ', $index->columns) . ')');
156 156
             }
157 157
         }
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->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
 
Please login to merge, or discard this patch.