Completed
Push — master ( aba273...18247e )
by Ivan
02:46
created
src/DriverAbstract.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
         $new = '';
13 13
         $par = array_values($par);
14 14
         if (substr_count($sql, '?') === 2 && !is_array($par[0])) {
15
-            $par = [ $par ];
15
+            $par = [$par];
16 16
         }
17 17
         $parts = explode('??', $sql);
18 18
         $index = 0;
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             $index += count($tmp) - 1;
23 23
             if (isset($par[$index])) {
24 24
                 if (!is_array($par[$index])) {
25
-                    $par[$index] = [ $par[$index] ];
25
+                    $par[$index] = [$par[$index]];
26 26
                 }
27 27
                 $params = $par[$index];
28 28
                 array_splice($par, $index, 1, $params);
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 $new .= implode(',', array_fill(0, count($params), '?'));
31 31
             }
32 32
         }
33
-        return [ $new, $par ];
33
+        return [$new, $par];
34 34
     }
35 35
     /**
36 36
      * Run a query (prepare & execute).
Please login to merge, or discard this patch.
src/driver/postgre/Statement.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
             $data = array();
24 24
         }
25 25
         $temp = (is_array($data) && count($data)) ?
26
-            \pg_query_params($this->driver, $this->statement, $data) :
27
-            \pg_query_params($this->driver, $this->statement, array());
26
+            \pg_query_params($this->driver, $this->statement, $data) : \pg_query_params($this->driver, $this->statement, array());
28 27
         if (!$temp) {
29 28
             throw new DBException('Could not execute query : '.\pg_last_error($this->driver).' <'.$this->statement.'>');
30 29
         }
Please login to merge, or discard this patch.
src/driver/postgre/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     }
63 63
     public function next()
64 64
     {
65
-        $this->fetched ++;
65
+        $this->fetched++;
66 66
         $this->last = \pg_fetch_array($this->statement, null, \PGSQL_ASSOC);
67 67
     }
68 68
     public function valid()
Please login to merge, or discard this patch.
src/driver/oracle/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     }
65 65
     public function next()
66 66
     {
67
-        $this->fetched ++;
67
+        $this->fetched++;
68 68
         $this->last = \oci_fetch_array($this->statement, \OCI_ASSOC + \OCI_RETURN_NULLS + \OCI_RETURN_LOBS);
69 69
     }
70 70
     public function valid()
Please login to merge, or discard this patch.
src/driver/sqlite/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
     }
63 63
     public function next()
64 64
     {
65
-        $this->fetched ++;
65
+        $this->fetched++;
66 66
         $this->last = $this->statement->fetchArray(\SQLITE3_ASSOC);
67 67
     }
68 68
     public function valid()
Please login to merge, or discard this patch.
src/driver/sqlite/Driver.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         parse_str($temp[1], $connection['opts']);
23 23
         $connection['name'] = $temp[0];
24 24
         if (!is_file($connection['name']) && is_file('/'.$connection['name'])) {
25
-           $connection['name'] = '/'.$connection['name'];
25
+            $connection['name'] = '/'.$connection['name'];
26 26
         }
27 27
         $this->connection = $connection;
28 28
     }
Please login to merge, or discard this patch.
src/driver/mysql/Result.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
                 if ($temp) {
30 30
                     $temp = $temp->fetch_fields();
31 31
                     if ($temp) {
32
-                        $columns = array_map(function ($v) { return $v->name; }, $temp);
32
+                        $columns = array_map(function($v) { return $v->name; }, $temp);
33 33
                     }
34 34
                 }
35 35
                 if (count($columns)) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     }
68 68
     public function current()
69 69
     {
70
-        return $this->nativeDriver ? $this->last : array_map(function ($v) { return $v; }, $this->row);
70
+        return $this->nativeDriver ? $this->last : array_map(function($v) { return $v; }, $this->row);
71 71
     }
72 72
     public function rewind()
73 73
     {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     }
85 85
     public function next()
86 86
     {
87
-        $this->fetched ++;
87
+        $this->fetched++;
88 88
         $this->last = $this->nativeDriver ? $this->result->fetch_assoc() : $this->statement->fetch();
89 89
     }
90 90
     public function valid()
Please login to merge, or discard this patch.
src/driver/ibase/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     }
68 68
     public function next()
69 69
     {
70
-        $this->fetched ++;
70
+        $this->fetched++;
71 71
         $this->last = \ibase_fetch_assoc($this->result, \IBASE_TEXT);
72 72
     }
73 73
     public function valid()
Please login to merge, or discard this patch.
src/driver/ibase/Driver.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
         $this->connect();
53 53
         $statement = \ibase_prepare($this->transaction !== null ? $this->transaction : $this->lnk, $sql);
54 54
         if ($statement === false) {
55
-            throw new DBException('Prepare error: ' . \ibase_errmsg());
55
+            throw new DBException('Prepare error: '.\ibase_errmsg());
56 56
         }
57 57
         return new Statement(
58 58
             $statement,
Please login to merge, or discard this patch.