@@ -12,6 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | namespace chillerlan\Database\Drivers\MySQLi; |
14 | 14 | |
15 | +use ReflectionMethod; |
|
15 | 16 | use chillerlan\Database\DBException; |
16 | 17 | use chillerlan\Database\Drivers\DBBaseDriver; |
17 | 18 | use chillerlan\Database\Drivers\DBDriverInterface; |
@@ -19,8 +20,6 @@ discard block |
||
19 | 20 | use mysqli_result; |
20 | 21 | use mysqli_sql_exception; |
21 | 22 | use mysqli_stmt; |
22 | -use ReflectionClass; |
|
23 | -use ReflectionMethod; |
|
24 | 23 | use stdClass; |
25 | 24 | |
26 | 25 | /** |
@@ -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 | } |