diff --git a/src/PDO.Iterator.class.php b/src/PDO.Iterator.class.php index 6b0a20f..bb1909e 100644 --- a/src/PDO.Iterator.class.php +++ b/src/PDO.Iterator.class.php @@ -11,20 +11,24 @@ public function __construct(PDOStatement $pdo, $fetchMode = PDO::FETCH_ASSOC) { $this->fetchMode = $fetchMode; } + #[\ReturnTypeWillChange] function rewind() { $this->position = 0; $this->pdo->execute(); $this->nextResult = $this->pdo->fetch($this->fetchMode, PDO::FETCH_ORI_NEXT); } + #[\ReturnTypeWillChange] function current() { return $this->nextResult; } + #[\ReturnTypeWillChange] function key() { return $this->position; } + #[\ReturnTypeWillChange] function next() { ++$this->position; $this->nextResult = $this->pdo->fetch($this->fetchMode, PDO::FETCH_ORI_NEXT); @@ -37,4 +41,4 @@ function valid() { } return !$invalid; } -} \ No newline at end of file +}