From 1a9a17e29749f9ce8d20512795ed06f989eaac99 Mon Sep 17 00:00:00 2001 From: Elf Sundae Date: Thu, 9 Jun 2022 20:23:36 +0800 Subject: [PATCH] Suppress PHP 8 deprecation notice for Iterator implementation methods --- src/Dot.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Dot.php b/src/Dot.php index 8d504d9..34cb4f6 100644 --- a/src/Dot.php +++ b/src/Dot.php @@ -507,6 +507,7 @@ public function toJson($key = null, $options = 0) * @param int|string $key * @return bool */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return $this->has($key); @@ -518,6 +519,7 @@ public function offsetExists($key) * @param int|string $key * @return mixed */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->get($key); @@ -529,6 +531,7 @@ public function offsetGet($key) * @param int|string|null $key * @param mixed $value */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { if (is_null($key)) { @@ -545,6 +548,7 @@ public function offsetSet($key, $value) * * @param int|string $key */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { $this->delete($key); @@ -562,6 +566,7 @@ public function offsetUnset($key) * @param int|string|null $key * @return int */ + #[\ReturnTypeWillChange] public function count($key = null) { return count($this->get($key)); @@ -578,6 +583,7 @@ public function count($key = null) * * @return \ArrayIterator */ + #[\ReturnTypeWillChange] public function getIterator() { return new ArrayIterator($this->items);