diff options
author | Aaron Parecki <[email protected]> | 2022-03-26 16:14:27 +0100 |
---|---|---|
committer | Aaron Parecki <[email protected]> | 2022-03-26 16:14:27 +0100 |
commit | 96dba464ea59b7a41236cc9ec04a33a66c6e0a37 (patch) | |
tree | 58bcb215cbdc6f205e37511e5a1dfc3feae7e553 | |
parent | d23f97053ef5d0b988a02c6a71eb5c6118b2f5b4 (diff) |
add annotations for php 8.1 compatibility
-rw-r--r-- | idiorm.php | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -2209,14 +2209,17 @@ // --- ArrayAccess --- // // --------------------- // + #[\ReturnTypeWillChange] public function offsetExists($key) { return array_key_exists($key, $this->_data); } + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->get($key); } + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { if(is_null($key)) { throw new InvalidArgumentException('You must specify a key/array index.'); @@ -2224,6 +2227,7 @@ $this->set($key, $value); } + #[\ReturnTypeWillChange] public function offsetUnset($key) { unset($this->_data[$key]); unset($this->_dirty_fields[$key]); @@ -2445,6 +2449,7 @@ * Get the number of records in the result set * @return int */ + #[\ReturnTypeWillChange] public function count() { return count($this->_results); } @@ -2454,6 +2459,7 @@ * over the result set. * @return \ArrayIterator */ + #[\ReturnTypeWillChange] public function getIterator() { return new ArrayIterator($this->_results); } @@ -2463,6 +2469,7 @@ * @param int|string $offset * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($offset) { return isset($this->_results[$offset]); } @@ -2472,6 +2479,7 @@ * @param int|string $offset * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($offset) { return $this->_results[$offset]; } @@ -2481,6 +2489,7 @@ * @param int|string $offset * @param mixed $value */ + #[\ReturnTypeWillChange] public function offsetSet($offset, $value) { $this->_results[$offset] = $value; } @@ -2489,6 +2498,7 @@ * ArrayAccess * @param int|string $offset */ + #[\ReturnTypeWillChange] public function offsetUnset($offset) { unset($this->_results[$offset]); } |