add return type, remove unecessary reset

This commit is contained in:
Thomas Portelange 2023-10-25 11:07:09 +02:00 committed by GitHub
parent 52e29831bc
commit c77d1c2080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -56,14 +56,13 @@ class SQLite3Query extends Query
/** /**
* @todo This looks terrible but there is no SQLite3::get_num_rows() implementation * @todo This looks terrible but there is no SQLite3::get_num_rows() implementation
*/ */
private function countRecords() private function countRecords(): int
{ {
// Some queries are not iterable using fetchArray like CREATE statement // Some queries are not iterable using fetchArray like CREATE statement
if (!$this->handle->numColumns()) { if (!$this->handle->numColumns()) {
return 0; return 0;
} }
$this->handle->reset();
$c = 0; $c = 0;
while ($this->handle->fetchArray()) { while ($this->handle->fetchArray()) {
$c++; $c++;