Skip to content

Commit a10000a

Browse files
committed
Merge branch '4.4' into 5.3
* 4.4: Fix return types for PHP 8.1
2 parents 17f50e0 + 70362f1 commit a10000a

13 files changed

+26
-4
lines changed

Finder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ public function in($dirs)
605605
*
606606
* @throws \LogicException if the in() method has not been called
607607
*/
608+
#[\ReturnTypeWillChange]
608609
public function getIterator()
609610
{
610611
if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
@@ -687,6 +688,7 @@ public function hasResults()
687688
*
688689
* @return int
689690
*/
691+
#[\ReturnTypeWillChange]
690692
public function count()
691693
{
692694
return iterator_count($this->getIterator());

Iterator/CustomFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function __construct(\Iterator $iterator, array $filters)
4646
*
4747
* @return bool true if the value should be kept, false otherwise
4848
*/
49+
#[\ReturnTypeWillChange]
4950
public function accept()
5051
{
5152
$fileinfo = $this->current();

Iterator/DateRangeFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function __construct(\Iterator $iterator, array $comparators)
3838
*
3939
* @return bool true if the value should be kept, false otherwise
4040
*/
41+
#[\ReturnTypeWillChange]
4142
public function accept()
4243
{
4344
$fileinfo = $this->current();

Iterator/DepthRangeFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth
3838
*
3939
* @return bool true if the value should be kept, false otherwise
4040
*/
41+
#[\ReturnTypeWillChange]
4142
public function accept()
4243
{
4344
return $this->getInnerIterator()->getDepth() >= $this->minDepth;

Iterator/ExcludeDirectoryFilterIterator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function __construct(\Iterator $iterator, array $directories)
5252
*
5353
* @return bool True if the value should be kept, false otherwise
5454
*/
55+
#[\ReturnTypeWillChange]
5556
public function accept()
5657
{
5758
if ($this->isRecursive && isset($this->excludedDirs[$this->getFilename()]) && $this->isDir()) {
@@ -71,6 +72,7 @@ public function accept()
7172
/**
7273
* @return bool
7374
*/
75+
#[\ReturnTypeWillChange]
7476
public function hasChildren()
7577
{
7678
return $this->isRecursive && $this->iterator->hasChildren();
@@ -79,6 +81,7 @@ public function hasChildren()
7981
/**
8082
* @return self
8183
*/
84+
#[\ReturnTypeWillChange]
8285
public function getChildren()
8386
{
8487
$children = new self($this->iterator->getChildren(), []);

Iterator/FileTypeFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function __construct(\Iterator $iterator, int $mode)
3939
*
4040
* @return bool true if the value should be kept, false otherwise
4141
*/
42+
#[\ReturnTypeWillChange]
4243
public function accept()
4344
{
4445
$fileinfo = $this->current();

Iterator/FilecontentFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class FilecontentFilterIterator extends MultiplePcreFilterIterator
2424
*
2525
* @return bool true if the value should be kept, false otherwise
2626
*/
27+
#[\ReturnTypeWillChange]
2728
public function accept()
2829
{
2930
if (!$this->matchRegexps && !$this->noMatchRegexps) {

Iterator/FilenameFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class FilenameFilterIterator extends MultiplePcreFilterIterator
2525
*
2626
* @return bool true if the value should be kept, false otherwise
2727
*/
28+
#[\ReturnTypeWillChange]
2829
public function accept()
2930
{
3031
return $this->isAccepted($this->current()->getFilename());

Iterator/PathFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class PathFilterIterator extends MultiplePcreFilterIterator
2424
*
2525
* @return bool true if the value should be kept, false otherwise
2626
*/
27+
#[\ReturnTypeWillChange]
2728
public function accept()
2829
{
2930
$filename = $this->current()->getRelativePathname();

Iterator/SizeRangeFilterIterator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function __construct(\Iterator $iterator, array $comparators)
3838
*
3939
* @return bool true if the value should be kept, false otherwise
4040
*/
41+
#[\ReturnTypeWillChange]
4142
public function accept()
4243
{
4344
$fileinfo = $this->current();

0 commit comments

Comments
 (0)