From dc859ff903aef32e5b411ff336a815ac5783103c Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 21 Jul 2023 15:56:10 +0300 Subject: [PATCH] fix: Add ReturnTypeWillChange annotation to fix deprecation warnings --- src/Query/Result.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Query/Result.php b/src/Query/Result.php index 9b40440..ff9a17c 100644 --- a/src/Query/Result.php +++ b/src/Query/Result.php @@ -142,21 +142,25 @@ public function __get($name) * ArrayAccess */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->rows[$offset]); } + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->rows[$offset]; } + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { throw ResultException::isReadonly(); } + #[\ReturnTypeWillChange] public function offsetUnset($offset) { throw ResultException::isReadonly(); @@ -166,26 +170,31 @@ public function offsetUnset($offset) * Iterator */ + #[\ReturnTypeWillChange] public function current() { return $this->rows[$this->current]; } + #[\ReturnTypeWillChange] public function next() { $this->current++; } + #[\ReturnTypeWillChange] public function key() { return $this->current; } + #[\ReturnTypeWillChange] public function valid() { return isset($this->rows[$this->current]); } + #[\ReturnTypeWillChange] public function rewind() { $this->current = 0; @@ -195,6 +204,7 @@ public function rewind() * Countable */ + #[\ReturnTypeWillChange] public function count() { return count($this->rows);