diff --git a/src/Db/OdbcResultSet.php b/src/Db/OdbcResultSet.php index 5530321..a622632 100644 --- a/src/Db/OdbcResultSet.php +++ b/src/Db/OdbcResultSet.php @@ -81,8 +81,9 @@ class OdbcResultSet implements \Iterator, \ArrayAccess, \Countable } // Iterator - /** - * @return bool|array + /** + * Return the current element + * @return mixed */ public function current() { @@ -90,32 +91,37 @@ class OdbcResultSet implements \Iterator, \ArrayAccess, \Countable } /** - * @return int + * Return the key of the current element + * @return mixed */ - public function key() + public function key(): mixed { return $this->cursor_index; } /** - * @return array|bool + * Move forward to next element + * @return void */ - public function next() + public function next(): void { - $current = $this->current(); ++$this->cursor_index; - return $current; } - public function rewind() + /** + * Rewind the Iterator to the first element + * @return void + */ + public function rewind(): void { $this->cursor_index = 0; } /** + * Checks if current position is valid * @return bool */ - public function valid() + public function valid(): bool { return $this->offsetExists($this->cursor_index); }