Skip to content

Commit cc78679

Browse files
committed
PHP8.1 specific fix
1 parent 5bfc99e commit cc78679

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Builder/RunnableSelect.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use IteratorAggregate;
66
use Kir\MySQL\Tools\AliasReplacer;
77
use Kir\MySQL\Builder\Helpers\DBIgnoreRow;
8+
use Traversable;
89

910
/**
1011
* @extends IteratorAggregate<int, array<string, mixed>>
@@ -118,7 +119,7 @@ public function fetchValue($default = null, ?callable $fn = null);
118119
public function getFoundRows(): int;
119120

120121
/**
121-
* @return Generator<int, array<string, mixed>>
122+
* @return Traversable<int, array<string, mixed>>
122123
*/
123-
public function getIterator();
124+
public function getIterator(): Traversable;
124125
}

src/Databases/MySQL/MySQLRunnableSelect.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use PDO;
1313
use stdClass;
1414
use Throwable;
15+
use Traversable;
1516

1617
/**
1718
*/
@@ -236,9 +237,9 @@ private function createStatement(): QueryStatement {
236237
}
237238

238239
/**
239-
* @return Generator<int, array<string, mixed>>
240+
* @return Traversable<int, array<string, mixed>>
240241
*/
241-
public function getIterator() {
242+
public function getIterator(): Traversable {
242243
yield from $this->fetchRowsLazy();
243244
}
244245

0 commit comments

Comments
 (0)