Skip to content

Commit

Permalink
Fix for PHP8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Aug 21, 2021
1 parent 36c35b0 commit 6302084
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Iterator/RecursiveDirectoryIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function __construct($path, $flags = 0)
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function getChildren()
{
return new static($this->getPathname(), $this->getFlags());
Expand All @@ -58,6 +59,7 @@ public function getChildren()
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function key()
{
$key = parent::key();
Expand All @@ -72,6 +74,7 @@ public function key()
/**
* {@inheritdoc}
*/
#[\ReturnTypeWillChange]
public function current()
{
$current = parent::current();
Expand Down
4 changes: 4 additions & 0 deletions src/Iterator/RegexFilterIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function __construct($regExp, $staticPrefix, Iterator $innerIterator, $mo
/**
* Rewind the iterator to the first position.
*/
#[\ReturnTypeWillChange]
public function rewind()
{
parent::rewind();
Expand All @@ -106,6 +107,7 @@ public function rewind()
*
* @return int The current position.
*/
#[\ReturnTypeWillChange]
public function key()
{
if (!$this->valid()) {
Expand All @@ -124,6 +126,7 @@ public function key()
*
* @see Iterator::next()
*/
#[\ReturnTypeWillChange]
public function next()
{
if ($this->valid()) {
Expand All @@ -137,6 +140,7 @@ public function next()
*
* @return bool Whether the path is accepted.
*/
#[\ReturnTypeWillChange]
public function accept()
{
$path = ($this->mode & self::FILTER_VALUE) ? $this->current() : parent::key();
Expand Down

0 comments on commit 6302084

Please sign in to comment.