Skip to content

Commit

Permalink
Merge branch 'php81/prevent-returntype-will-change-notices' of https:…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Aug 26, 2021
2 parents 5be0b00 + be8fe72 commit 915a694
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Files/FileList.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use PHP_CodeSniffer\Ruleset;
use PHP_CodeSniffer\Config;
use PHP_CodeSniffer\Exceptions\DeepExitException;
use ReturnTypeWillChange;

class FileList implements \Iterator, \Countable
{
Expand Down Expand Up @@ -169,6 +170,7 @@ private function getFilterClass()
*
* @return void
*/
#[ReturnTypeWillChange]
public function rewind()
{
reset($this->files);
Expand All @@ -181,6 +183,7 @@ public function rewind()
*
* @return \PHP_CodeSniffer\Files\File
*/
#[ReturnTypeWillChange]
public function current()
{
$path = key($this->files);
Expand All @@ -198,6 +201,7 @@ public function current()
*
* @return void
*/
#[ReturnTypeWillChange]
public function key()
{
return key($this->files);
Expand All @@ -210,6 +214,7 @@ public function key()
*
* @return void
*/
#[ReturnTypeWillChange]
public function next()
{
next($this->files);
Expand All @@ -222,6 +227,7 @@ public function next()
*
* @return boolean
*/
#[ReturnTypeWillChange]
public function valid()
{
if (current($this->files) === false) {
Expand All @@ -238,6 +244,7 @@ public function valid()
*
* @return integer
*/
#[ReturnTypeWillChange]
public function count()
{
return $this->numFiles;
Expand Down
3 changes: 3 additions & 0 deletions src/Filters/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use PHP_CodeSniffer\Util;
use PHP_CodeSniffer\Ruleset;
use PHP_CodeSniffer\Config;
use ReturnTypeWillChange;

class Filter extends \RecursiveFilterIterator
{
Expand Down Expand Up @@ -89,6 +90,7 @@ public function __construct($iterator, $basedir, Config $config, Ruleset $rulese
*
* @return bool
*/
#[ReturnTypeWillChange]
public function accept()
{
$filePath = $this->current();
Expand Down Expand Up @@ -130,6 +132,7 @@ public function accept()
*
* @return \RecursiveIterator
*/
#[ReturnTypeWillChange]
public function getChildren()
{
$filterClass = get_called_class();
Expand Down

0 comments on commit 915a694

Please sign in to comment.