Skip to content

Commit

Permalink
FileList: improve doc specificity
Browse files Browse the repository at this point in the history
Make the iterator list type specifications more specific to comply with expectations in PHPStan 2.0.

Note: in reality the type should be `\RegexIterator<int, string, \Traversable<int, string>>`, but would yield yet another PHPStan error, so let's just leave it like this for now.
  • Loading branch information
jrfnl committed Nov 8, 2024
1 parent 987ce02 commit 1b4652c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Scripts/FileList.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class FileList
/**
* Regex iterator.
*
* @var \RegexIterator
* @var \RegexIterator<mixed, mixed, \Traversable<mixed, mixed>>
*/
protected $fileIterator;

Expand Down Expand Up @@ -85,7 +85,7 @@ public function __construct($directory, $rootPath = '', $filter = '')
/**
* Retrieve the filtered file list iterator.
*
* @return \RegexIterator
* @return \RegexIterator<mixed, mixed, \Traversable<mixed, mixed>>
*/
public function getIterator()
{
Expand Down

0 comments on commit 1b4652c

Please sign in to comment.