Completed
Push — master ( 8c9a52...5e0a9d )
by Hung
06:07 queued 03:48
created
src/Drivers/MultiResultSetBase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
      */
111 111
     public function key()
112 112
     {
113
-        return (int)$this->cursor;
113
+        return (int) $this->cursor;
114 114
     }
115 115
 
116 116
     /**
Please login to merge, or discard this patch.
src/Drivers/Pdo/Connection.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 
48 48
         $stm = $this->connection->prepare($query);
49 49
 
50
-        try{
50
+        try {
51 51
             $stm->execute();
52 52
         }
53
-        catch(\PDOException $exception){
54
-            throw new DatabaseException($exception->getMessage() . ' [' . $query . ']');
53
+        catch (\PDOException $exception) {
54
+            throw new DatabaseException($exception->getMessage().' ['.$query.']');
55 55
         }
56 56
 
57 57
         return new ResultSet($stm);
@@ -67,20 +67,20 @@  discard block
 block discarded – undo
67 67
 
68 68
         $dsn = 'mysql:';
69 69
         if (isset($params['host']) && $params['host'] != '') {
70
-            $dsn .= 'host=' . $params['host'] . ';';
70
+            $dsn .= 'host='.$params['host'].';';
71 71
         }
72 72
         if (isset($params['port'])) {
73
-            $dsn .= 'port=' . $params['port'] . ';';
73
+            $dsn .= 'port='.$params['port'].';';
74 74
         }
75 75
         if (isset($params['charset'])) {
76
-            $dsn .= 'charset=' . $params['charset'] . ';';
76
+            $dsn .= 'charset='.$params['charset'].';';
77 77
         }
78 78
 
79 79
         if (isset($params['socket']) && $params['socket'] != '') {
80
-            $dsn .= 'unix_socket=' . $params['socket'] . ';';
80
+            $dsn .= 'unix_socket='.$params['socket'].';';
81 81
         }
82 82
 
83
-        if (!$suppress_error && ! $this->silence_connection_warning) {
83
+        if (!$suppress_error && !$this->silence_connection_warning) {
84 84
             try {
85 85
                 $con = new \Pdo($dsn);
86 86
             } catch (\PDOException $exception) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 throw new ConnectionException($exception->getMessage());
94 94
             }
95 95
         }
96
-        if(!isset($con))
96
+        if (!isset($con))
97 97
         {
98 98
             throw new ConnectionException('connection error');
99 99
         }
@@ -131,24 +131,24 @@  discard block
 block discarded – undo
131 131
         $result = array();
132 132
         $count = 0;
133 133
 
134
-        if(version_compare(PHP_VERSION, '5.4.0', '>='))
134
+        if (version_compare(PHP_VERSION, '5.4.0', '>='))
135 135
         {
136 136
             try {
137 137
                 $statement = $this->connection->query(implode(';', $queue));
138 138
             } catch (\PDOException $exception) {
139
-                throw new DatabaseException($exception->getMessage() .' [ '.implode(';', $queue).']');
139
+                throw new DatabaseException($exception->getMessage().' [ '.implode(';', $queue).']');
140 140
             }
141 141
 
142 142
             return new MultiResultSet($statement);
143 143
         }
144 144
         else
145 145
         {
146
-            foreach($queue as $sql)
146
+            foreach ($queue as $sql)
147 147
             {
148 148
                 try {
149 149
                     $statement = $this->connection->query($sql);
150 150
                 } catch (\PDOException $exception) {
151
-                    throw new DatabaseException($exception->getMessage() .' [ '.implode(';', $queue).']');
151
+                    throw new DatabaseException($exception->getMessage().' [ '.implode(';', $queue).']');
152 152
                 }
153 153
                 if ($statement->columnCount()) {
154 154
                     $set = new ResultSet($statement);
Please login to merge, or discard this patch.
src/Drivers/Mysqli/Connection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             }
64 64
         }
65 65
 
66
-        if (!$suppress_error && ! $this->silence_connection_warning) {
66
+        if (!$suppress_error && !$this->silence_connection_warning) {
67 67
             $conn->real_connect($data['host'], null, null, null, (int) $data['port'], $data['socket']);
68 68
         } else {
69 69
             @ $conn->real_connect($data['host'], null, null, null, (int) $data['port'], $data['socket']);
Please login to merge, or discard this patch.
src/Drivers/ResultSetBase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function hasNextRow()
38 38
     {
39 39
         return $this->current_row === null
40
-            ? (boolean)$this->num_rows
40
+            ? (boolean) $this->num_rows
41 41
             : $this->current_row + 1 < $this->num_rows;
42 42
     }
43 43
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      */
164 164
     public function key()
165 165
     {
166
-        return (int)$this->current_row;
166
+        return (int) $this->current_row;
167 167
     }
168 168
 
169 169
     /**
Please login to merge, or discard this patch.
src/SphinxQL.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -623,7 +623,7 @@
 block discarded – undo
623 623
                 } elseif (is_array($option['value'])) {
624 624
                     array_walk(
625 625
                         $option['value'],
626
-                        function (&$val, $key) {
626
+                        function(&$val, $key) {
627 627
                             $val = $key.'='.$val;
628 628
                         }
629 629
                     );
Please login to merge, or discard this patch.
src/Helper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
 
159 159
         // user variables must always be processed as arrays
160
-        if ($user_var && ! is_array($value)) {
160
+        if ($user_var && !is_array($value)) {
161 161
             $query .= '= ('.$this->getConnection()->quote($value).')';
162 162
         } elseif (is_array($value)) {
163 163
             $query .= '= ('.implode(', ', $this->getConnection()->quoteArr($value)).')';
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     public function attachIndex($disk_index, $rt_index)
262 262
     {
263 263
         return $this->query('ATTACH INDEX '.$this->getConnection()->quoteIdentifier($disk_index).
264
-            ' TO RTINDEX '. $this->getConnection()->quoteIdentifier($rt_index));
264
+            ' TO RTINDEX '.$this->getConnection()->quoteIdentifier($rt_index));
265 265
     }
266 266
 
267 267
     /**
Please login to merge, or discard this patch.
src/Drivers/SimpleConnection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             }
64 64
         }
65 65
 
66
-        if (!$suppress_error && ! $this->silence_connection_warning) {
66
+        if (!$suppress_error && !$this->silence_connection_warning) {
67 67
             $conn->real_connect($data['host'], null, null, null, (int) $data['port'], $data['socket']);
68 68
         } else {
69 69
             @ $conn->real_connect($data['host'], null, null, null, (int) $data['port'], $data['socket']);
Please login to merge, or discard this patch.