Passed
Push — main ( 93e1a1...ce3d4e )
by Thierry
08:29
created
src/Db/Pdo/Connection.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@
 block discarded – undo
17 17
     public $timeout;
18 18
 
19 19
     /**
20
-    * @inheritDoc
21
-    */
20
+     * @inheritDoc
21
+     */
22 22
     public function open(string $database, string $schema = '')
23 23
     {
24 24
         $server = str_replace(":", "' port='", addcslashes($this->driver->options('server'), "'\\"));
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
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         // Init config
16 16
         $this->config->jush = 'pgsql';
17 17
         $this->config->drivers = ["PgSQL", "PDO_PgSQL"];
18
-        $this->config->setTypes([ //! arrays
18
+        $this->config->setTypes([//! arrays
19 19
             'Numbers' => ["smallint" => 5, "integer" => 10, "bigint" => 19, "boolean" => 1,
20 20
                 "numeric" => 0, "real" => 7, "double precision" => 16, "money" => 20],
21 21
             'Date and time' => ["date" => 13, "time" => 17, "timestamp" => 20, "timestamptz" => 21, "interval" => 0],
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $this->config->editFunctions = [[
35 35
             "char" => "md5",
36 36
             "date|time" => "now",
37
-        ],[
37
+        ], [
38 38
             $this->numberRegex() => "+/-",
39 39
             "date|time" => "+ interval/- interval", //! escape
40 40
             "char|text" => "||",
Please login to merge, or discard this patch.
src/Db/DatabaseTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
      */
179 179
     public function truncateTables(array $tables)
180 180
     {
181
-        $this->driver->execute('TRUNCATE ' . implode(', ', array_map(function ($table) {
181
+        $this->driver->execute('TRUNCATE ' . implode(', ', array_map(function($table) {
182 182
             return $this->driver->escapeTableName($table);
183 183
         }, $tables)));
184 184
         return true;
Please login to merge, or discard this patch.
src/Db/Query.php 1 patch
Spacing   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     protected function limitToOne(string $table, string $query, string $where)
20 20
     {
21
-        return (preg_match('~^INTO~', $query) ? $this->driver->getLimitClause($query, $where, 1, 0) :
22
-            " $query" . ($this->driver->isView($this->driver->tableStatusOrName($table)) ? $where :
23
-            " WHERE ctid = (SELECT ctid FROM " . $this->driver->escapeTableName($table) . $where . ' LIMIT 1)'));
21
+        return (preg_match('~^INTO~', $query) ? $this->driver->getLimitClause($query, $where, 1, 0) : " $query" . ($this->driver->isView($this->driver->tableStatusOrName($table)) ? $where : " WHERE ctid = (SELECT ctid FROM " . $this->driver->escapeTableName($table) . $where . ' LIMIT 1)'));
24 22
     }
25 23
 
26 24
     /**
Please login to merge, or discard this patch.