Completed
Push — master ( 2a07a9...fd76e0 )
by Ivan
12:20
created
src/driver/oracle/Driver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,11 +73,11 @@
 block discarded – undo
73 73
         $res = \oci_execute(\oci_parse($this->lnk, $sql));
74 74
         if ($log) {
75 75
             $tm = microtime(true) - $tm;
76
-            if ($tm >= (float)$this->option('log_slow', 0)) {
76
+            if ($tm >= (float) $this->option('log_slow', 0)) {
77 77
                 @file_put_contents(
78 78
                     $log,
79
-                    '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" .
80
-                    $sql . "\r\n" .
79
+                    '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n".
80
+                    $sql."\r\n".
81 81
                     "\r\n",
82 82
                     FILE_APPEND
83 83
                 );
Please login to merge, or discard this patch.
src/driver/oracle/Statement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
             if (!is_array($err)) {
61 61
                 $err = [];
62 62
             }
63
-            if ($log && (int)$this->driver->option('log_errors', 1)) {
63
+            if ($log && (int) $this->driver->option('log_errors', 1)) {
64 64
                 @file_put_contents(
65 65
                     $log,
66
-                    '--' . date('Y-m-d H:i:s') . ' ERROR: ' . implode(',', $err) . "\r\n" .
67
-                    $this->sql . "\r\n" .
66
+                    '--'.date('Y-m-d H:i:s').' ERROR: '.implode(',', $err)."\r\n".
67
+                    $this->sql."\r\n".
68 68
                     "\r\n",
69 69
                     FILE_APPEND
70 70
                 );
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
         }
74 74
         if ($log) {
75 75
             $tm = microtime(true) - $tm;
76
-            if ($tm >= (float)$this->driver->option('log_slow', 0)) {
76
+            if ($tm >= (float) $this->driver->option('log_slow', 0)) {
77 77
                 @file_put_contents(
78 78
                     $log,
79
-                    '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" .
80
-                    $this->sql . "\r\n" .
79
+                    '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n".
80
+                    $this->sql."\r\n".
81 81
                     "\r\n",
82 82
                     FILE_APPEND
83 83
                 );
Please login to merge, or discard this patch.
src/driver/postgre/Driver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,11 +76,11 @@
 block discarded – undo
76 76
         $res = \pg_query($this->lnk, $sql);
77 77
         if ($log) {
78 78
             $tm = microtime(true) - $tm;
79
-            if ($tm >= (float)$this->option('log_slow', 0)) {
79
+            if ($tm >= (float) $this->option('log_slow', 0)) {
80 80
                 @file_put_contents(
81 81
                     $log,
82
-                    '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" .
83
-                    $sql . "\r\n" .
82
+                    '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n".
83
+                    $sql."\r\n".
84 84
                     "\r\n",
85 85
                     FILE_APPEND
86 86
                 );
Please login to merge, or discard this patch.
src/driver/postgre/Statement.php 1 patch
Spacing   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,14 +29,13 @@  discard block
 block discarded – undo
29 29
             $tm = microtime(true);
30 30
         }
31 31
         $temp = (is_array($data) && count($data)) ?
32
-            \pg_query_params($this->driver, $this->statement, $data) :
33
-            \pg_query_params($this->driver, $this->statement, array());
32
+            \pg_query_params($this->driver, $this->statement, $data) : \pg_query_params($this->driver, $this->statement, array());
34 33
         if (!$temp) {
35
-            if ($log && (int)$this->drv->option('log_errors', 1)) {
34
+            if ($log && (int) $this->drv->option('log_errors', 1)) {
36 35
                 @file_put_contents(
37 36
                     $log,
38
-                    '--' . date('Y-m-d H:i:s') . ' ERROR: ' . \pg_last_error($this->driver) . "\r\n" .
39
-                    $this->statement . "\r\n" .
37
+                    '--'.date('Y-m-d H:i:s').' ERROR: '.\pg_last_error($this->driver)."\r\n".
38
+                    $this->statement."\r\n".
40 39
                     "\r\n",
41 40
                     FILE_APPEND
42 41
                 );
@@ -45,11 +44,11 @@  discard block
 block discarded – undo
45 44
         }
46 45
         if ($log) {
47 46
             $tm = microtime(true) - $tm;
48
-            if ($tm >= (float)$this->drv->option('log_slow', 0)) {
47
+            if ($tm >= (float) $this->drv->option('log_slow', 0)) {
49 48
                 @file_put_contents(
50 49
                     $log,
51
-                    '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" .
52
-                    $this->statement . "\r\n" .
50
+                    '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n".
51
+                    $this->statement."\r\n".
53 52
                     "\r\n",
54 53
                     FILE_APPEND
55 54
                 );
Please login to merge, or discard this patch.
src/driver/mysql/Driver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         if ($this->lnk === null) {
39 39
             $this->lnk = new \mysqli(
40
-                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '') .
40
+                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '').
41 41
                     $this->connection['host'],
42 42
                 $this->connection['user'],
43 43
                 $this->connection['pass'],
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         $res = $this->lnk->query($sql);
98 98
         if ($log) {
99 99
             $tm = microtime(true) - $tm;
100
-            if ($tm >= (float)$this->option('log_slow', 0)) {
100
+            if ($tm >= (float) $this->option('log_slow', 0)) {
101 101
                 @file_put_contents(
102 102
                     $log,
103
-                    '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" .
104
-                    $sql . "\r\n" .
103
+                    '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n".
104
+                    $sql."\r\n".
105 105
                     "\r\n",
106 106
                     FILE_APPEND
107 107
                 );
Please login to merge, or discard this patch.
src/driver/mysql/Statement.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -91,24 +91,24 @@
 block discarded – undo
91 91
             $tm = microtime(true);
92 92
         }
93 93
         if (!$this->statement->execute()) {
94
-            if ($log && (int)$this->driver->option('log_errors', 1)) {
94
+            if ($log && (int) $this->driver->option('log_errors', 1)) {
95 95
                 @file_put_contents(
96 96
                     $log,
97
-                    '--' . date('Y-m-d H:i:s') . ' ERROR: ' . $this->statement->error . "\r\n" .
98
-                    $this->sql . "\r\n" .
97
+                    '--'.date('Y-m-d H:i:s').' ERROR: '.$this->statement->error."\r\n".
98
+                    $this->sql."\r\n".
99 99
                     "\r\n",
100 100
                     FILE_APPEND
101 101
                 );
102 102
             }
103
-            throw new DBException('Prepared execute error: ' . $this->statement->error);
103
+            throw new DBException('Prepared execute error: '.$this->statement->error);
104 104
         }
105 105
         if ($log) {
106 106
             $tm = microtime(true) - $tm;
107
-            if ($tm >= (float)$this->driver->option('log_slow', 0)) {
107
+            if ($tm >= (float) $this->driver->option('log_slow', 0)) {
108 108
                 @file_put_contents(
109 109
                     $log,
110
-                    '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" .
111
-                    $this->sql . "\r\n" .
110
+                    '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n".
111
+                    $this->sql."\r\n".
112 112
                     "\r\n",
113 113
                     FILE_APPEND
114 114
                 );
Please login to merge, or discard this patch.
src/driver/sphinx/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     }
59 59
     public function next()
60 60
     {
61
-        $this->fetched ++;
61
+        $this->fetched++;
62 62
         $this->last = $this->result->fetch_assoc();
63 63
     }
64 64
     public function valid()
Please login to merge, or discard this patch.
src/driver/sphinx/Driver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         if ($this->lnk === null) {
39 39
             $this->lnk = new \mysqli(
40
-                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '') .
40
+                (isset($this->connection['opts']['persist']) && $this->connection['opts']['persist'] ? 'p:' : '').
41 41
                     $this->connection['host'],
42 42
                 $this->connection['user'],
43 43
                 $this->connection['pass'],
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
         $res = $this->lnk->query($sql);
98 98
         if ($log) {
99 99
             $tm = microtime(true) - $tm;
100
-            if ($tm >= (float)$this->option('log_slow', 0)) {
100
+            if ($tm >= (float) $this->option('log_slow', 0)) {
101 101
                 @file_put_contents(
102 102
                     $log,
103
-                    '--' . date('Y-m-d H:i:s') . ' ' . sprintf('%01.6f', $tm) . "s\r\n" .
104
-                    $sql . "\r\n" .
103
+                    '--'.date('Y-m-d H:i:s').' '.sprintf('%01.6f', $tm)."s\r\n".
104
+                    $sql."\r\n".
105 105
                     "\r\n",
106 106
                     FILE_APPEND
107 107
                 );
Please login to merge, or discard this patch.
src/driver/sphinx/Statement.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,23 +40,23 @@
 block discarded – undo
40 40
                             break;
41 41
                         case 'array':
42 42
                             $par = implode(',', $par);
43
-                            $par = "'" . $this->lnk->escape_string($par) . "'";
43
+                            $par = "'".$this->lnk->escape_string($par)."'";
44 44
                             break;
45 45
                         case 'object':
46 46
                             $par = serialize($par);
47
-                            $par = "'" . $this->lnk->escape_string($par) . "'";
47
+                            $par = "'".$this->lnk->escape_string($par)."'";
48 48
                             break;
49 49
                         case 'resource':
50 50
                             if (is_resource($v) && get_resource_type($v) === 'stream') {
51 51
                                 $par = stream_get_contents($par);
52
-                                $par = "'" . $this->lnk->escape_string($par) . "'";
52
+                                $par = "'".$this->lnk->escape_string($par)."'";
53 53
                             } else {
54 54
                                 $par = serialize($par);
55
-                                $par = "'" . $this->lnk->escape_string($par) . "'";
55
+                                $par = "'".$this->lnk->escape_string($par)."'";
56 56
                             }
57 57
                             break;
58 58
                         default:
59
-                            $par = "'" . $this->lnk->escape_string((string)$par) . "'";
59
+                            $par = "'".$this->lnk->escape_string((string) $par)."'";
60 60
                             break;
61 61
                     }
62 62
                     $sql .= $par;
Please login to merge, or discard this patch.