diff --git a/phpstan.neon b/phpstan.neon index 08566d0..e9a9e7e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ parameters: - level: 9 + level: 10 paths: - src - tests diff --git a/src/Factory.php b/src/Factory.php index 1b50128..610d41f 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -37,6 +37,8 @@ final class Factory * @param list|string $suffixes * @param list|string $prefixes * @param list $exclude + * + * @phpstan-ignore missingType.generics */ public function getFileIterator(array|string $paths, array|string $suffixes = '', array|string $prefixes = '', array $exclude = []): AppendIterator { diff --git a/src/Iterator.php b/src/Iterator.php index 405f25d..a1c9408 100644 --- a/src/Iterator.php +++ b/src/Iterator.php @@ -9,7 +9,6 @@ */ namespace SebastianBergmann\FileIterator; -use function assert; use function preg_match; use function realpath; use function str_ends_with; @@ -56,8 +55,6 @@ public function accept(): bool { $current = $this->getInnerIterator()->current(); - assert($current instanceof SplFileInfo); - $filename = $current->getFilename(); $realPath = $current->getRealPath();