Skip to content

Commit

Permalink
fix: Make it work with PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 22, 2021
1 parent 6684625 commit e119ca7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ClosureIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Generator;
use Iterator;
use ReturnTypeWillChange;

/**
* @template TKey
Expand Down Expand Up @@ -49,6 +50,7 @@ public function __construct(callable $callable, iterable $parameters = [])
/**
* @return T
*/
#[ReturnTypeWillChange]
public function current()
{
return $this->generator->current();
Expand All @@ -57,6 +59,7 @@ public function current()
/**
* @return TKey
*/
#[ReturnTypeWillChange]
public function key()
{
return $this->generator->key();
Expand Down
3 changes: 3 additions & 0 deletions src/IterableIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

use Generator;
use Iterator;
use ReturnTypeWillChange;

/**
* @template TKey
Expand Down Expand Up @@ -44,6 +45,7 @@ public function __construct(iterable $iterable)
/**
* @return T
*/
#[ReturnTypeWillChange]
public function current()
{
return $this->iterator->current();
Expand All @@ -52,6 +54,7 @@ public function current()
/**
* @return TKey
*/
#[ReturnTypeWillChange]
public function key()
{
return $this->iterator->key();
Expand Down

0 comments on commit e119ca7

Please sign in to comment.