@@ -129,7 +129,7 @@ |
||
129 | 129 | * |
130 | 130 | * @var int |
131 | 131 | */ |
132 | - public $sqlite_flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE; |
|
132 | + public $sqlite_flags = SQLITE3_OPEN_READWRITE|SQLITE3_OPEN_CREATE; |
|
133 | 133 | /** |
134 | 134 | * An optional encryption key used when encrypting and decrypting an SQLite database. |
135 | 135 | * |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | * @return array |
193 | 193 | * @internal |
194 | 194 | */ |
195 | - protected function getResult(PDOStatement &$stmt, $index, $assoc, $fetch_array){ |
|
195 | + protected function getResult(PDOStatement&$stmt, $index, $assoc, $fetch_array){ |
|
196 | 196 | $out = []; |
197 | 197 | $method = $assoc ? ($fetch_array ? PDO::FETCH_ASSOC : PDO::FETCH_OBJ) : PDO::FETCH_NUM; |
198 | - $i = 0 ; |
|
198 | + $i = 0; |
|
199 | 199 | |
200 | 200 | // ok, we have a result with one or more rows, loop out the rows and output as array |
201 | 201 | while($row = $stmt->fetch($method)){ |
@@ -225,16 +225,16 @@ discard block |
||
225 | 225 | * @param array $values |
226 | 226 | * @internal |
227 | 227 | */ |
228 | - protected function bindParams(PDOStatement &$stmt, array $values){ |
|
228 | + protected function bindParams(PDOStatement&$stmt, array $values){ |
|
229 | 229 | $param_no = 1; |
230 | 230 | |
231 | 231 | foreach($values as $v){ |
232 | 232 | |
233 | 233 | switch(gettype($v)){ |
234 | 234 | case 'boolean': $type = PDO::PARAM_BOOL; break; |
235 | - case 'integer': $type = PDO::PARAM_INT; break; |
|
235 | + case 'integer': $type = PDO::PARAM_INT; break; |
|
236 | 236 | case 'NULL': $type = PDO::PARAM_NULL; break; |
237 | - default: $type = PDO::PARAM_STR; break; |
|
237 | + default: $type = PDO::PARAM_STR; break; |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | $stmt->bindValue($param_no, $v, $type); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | if(class_exists($class)){ |
37 | 37 | $reflectionClass = new ReflectionClass($class); |
38 | 38 | |
39 | - if(!$reflectionClass->implementsInterface($interface)) { |
|
39 | + if(!$reflectionClass->implementsInterface($interface)){ |
|
40 | 40 | throw new DBException($class.' does not implement '.$interface); |
41 | 41 | } |
42 | 42 |
@@ -39,15 +39,15 @@ |
||
39 | 39 | public function driverDataProvider(){ |
40 | 40 | return [ |
41 | 41 | // native |
42 | - ['MYSQLI', MySQLiDriver::class, 'mysqli'], |
|
43 | - ['POSTGRESQL', PostgreSQLDriver::class, 'resource'], |
|
44 | - ['SQLITE3', SQLite3Driver::class, 'SQLite3'], |
|
42 | + ['MYSQLI', MySQLiDriver::class, 'mysqli'], |
|
43 | + ['POSTGRESQL', PostgreSQLDriver::class, 'resource'], |
|
44 | + ['SQLITE3', SQLite3Driver::class, 'SQLite3'], |
|
45 | 45 | |
46 | 46 | // PDO (obviously) |
47 | - ['PDO_MYSQL', PDOMySQLDriver::class, 'PDO'], |
|
47 | + ['PDO_MYSQL', PDOMySQLDriver::class, 'PDO'], |
|
48 | 48 | ['PDO_POSTGRES', PDOPostgresDriver::class, 'PDO'], |
49 | 49 | # ['PDO_FIREBIRD', PDOFirebirdDriver::class, 'PDO'], // https://github.com/asfernandes/firebird/blob/master/.travis.yml |
50 | - ['PDO_SQLITE', PDOSQLiteDriver::class, 'PDO'], |
|
50 | + ['PDO_SQLITE', PDOSQLiteDriver::class, 'PDO'], |
|
51 | 51 | ]; |
52 | 52 | } |
53 | 53 |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | |
188 | 188 | $out = []; |
189 | 189 | $method = 'fetch_'.($assoc ? ($fetch_array ? 'assoc' : 'object') : 'row'); |
190 | - $i = 0 ; |
|
190 | + $i = 0; |
|
191 | 191 | |
192 | 192 | // ok, we have a result with one or more rows, loop out the rows and output as array |
193 | 193 | while($row = $result->{$method}()){ |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | * @param \ReflectionMethod $reflectionMethod |
352 | 352 | * @param array $row |
353 | 353 | */ |
354 | - protected function insertPreparedRow(mysqli_stmt &$stmt, ReflectionMethod &$reflectionMethod, array &$row){ |
|
354 | + protected function insertPreparedRow(mysqli_stmt&$stmt, ReflectionMethod&$reflectionMethod, array &$row){ |
|
355 | 355 | $references = $this->getReferences($row); |
356 | 356 | array_unshift($references, $this->getTypes($references)); |
357 | 357 | $reflectionMethod->invokeArgs($stmt, $references); |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | * |
367 | 367 | * @return array|bool |
368 | 368 | */ |
369 | - protected function getResult(mysqli_stmt &$stmt, mysqli_result &$result, $assoc, $fetch_array){ |
|
369 | + protected function getResult(mysqli_stmt&$stmt, mysqli_result&$result, $assoc, $fetch_array){ |
|
370 | 370 | // get the columns and their references |
371 | 371 | // http://php.net/manual/mysqli-stmt.bind-result.php |
372 | 372 | $cols = $refs = []; |
@@ -422,7 +422,7 @@ discard block |
||
422 | 422 | foreach($values as &$v){ |
423 | 423 | switch(gettype($v)){ |
424 | 424 | case 'integer': $types[] = 'i'; break; |
425 | - case 'double': $types[] ='d'; break; |
|
425 | + case 'double': $types[] = 'd'; break; |
|
426 | 426 | default: $types[] = 's'; break; |
427 | 427 | } |
428 | 428 | } |