Skip to content

Commit 43c7f15

Browse files
authored
Merge pull request #30 from ElfSundae/suppress-Iterator-notice
[2.x] Suppress PHP 8 deprecation notice for Iterator implementation methods
2 parents a81c62a + 1a9a17e commit 43c7f15

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Dot.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ public function toJson($key = null, $options = 0)
507507
* @param int|string $key
508508
* @return bool
509509
*/
510+
#[\ReturnTypeWillChange]
510511
public function offsetExists($key)
511512
{
512513
return $this->has($key);
@@ -518,6 +519,7 @@ public function offsetExists($key)
518519
* @param int|string $key
519520
* @return mixed
520521
*/
522+
#[\ReturnTypeWillChange]
521523
public function offsetGet($key)
522524
{
523525
return $this->get($key);
@@ -529,6 +531,7 @@ public function offsetGet($key)
529531
* @param int|string|null $key
530532
* @param mixed $value
531533
*/
534+
#[\ReturnTypeWillChange]
532535
public function offsetSet($key, $value)
533536
{
534537
if (is_null($key)) {
@@ -545,6 +548,7 @@ public function offsetSet($key, $value)
545548
*
546549
* @param int|string $key
547550
*/
551+
#[\ReturnTypeWillChange]
548552
public function offsetUnset($key)
549553
{
550554
$this->delete($key);
@@ -562,6 +566,7 @@ public function offsetUnset($key)
562566
* @param int|string|null $key
563567
* @return int
564568
*/
569+
#[\ReturnTypeWillChange]
565570
public function count($key = null)
566571
{
567572
return count($this->get($key));
@@ -578,6 +583,7 @@ public function count($key = null)
578583
*
579584
* @return \ArrayIterator
580585
*/
586+
#[\ReturnTypeWillChange]
581587
public function getIterator()
582588
{
583589
return new ArrayIterator($this->items);

0 commit comments

Comments
 (0)