Skip to content

Commit

Permalink
More precise RecursiveIteratorIterator::__construct() types
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Dec 18, 2023
1 parent b973be4 commit 6ae305d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stubs/iterable.stub
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ class RecursiveIteratorIterator

/**
* @param T $iterator
* @param int $mode
* @param int $flags
* @param self::LEAVES_ONLY|self::SELF_FIRST|self::CHILD_FIRST $mode
* @param 0|self::CATCH_GET_CHILD $flags
*/
public function __construct(

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 -a tests/e2e/data/soap.php -c tests/e2e/data/empty.neon tests...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 -a tests/e2e/data/soap.php -c tests/e2e/data/empty.neon tests...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 -a tests/e2e/data/soap.php -c tests/e2e/data/empty.neon tests...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-4 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-4 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-4 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622 echo -n > phpstan-baseline.neon ../../bin/phpstan -vvv pa...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622 echo -n > phpstan-baseline.neon ../../bin/phpstan -vvv pa...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622 echo -n > phpstan-baseline.neon ../../bin/phpstan -vvv pa...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-3 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-3 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-3 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 tests/e2e/anon-class/Granularity.php)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 tests/e2e/anon-class/Granularity.php)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (cd e2e/baseline-uninit-prop-trait ../../bin/phpstan analyse --debug --configuration te...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 tests/e2e/anon-class/Granularity.php)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (cd e2e/baseline-uninit-prop-trait ../../bin/phpstan analyse --debug --configuration te...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (cd e2e/baseline-uninit-prop-trait ../../bin/phpstan analyse --debug --configuration te...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-1 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-1 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-1 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622-trait echo -n > phpstan-baseline.neon ../../bin/phpstan -...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622-trait echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/bug-9622-trait echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 -a tests/e2e/data/soap.php -c tests/e2e/data/empty.neon tests...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 -a tests/e2e/data/soap.php -c tests/e2e/data/empty.neon tests...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 -a tests/e2e/data/soap.php -c tests/e2e/data/empty.neon tests...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 e2e/phpstan-phpunit-190/test.php -c e2e/phpstan-phpunit-190/t...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 e2e/phpstan-phpunit-190/test.php -c e2e/phpstan-phpunit-190/t...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / E2E tests (bin/phpstan analyse -l 8 e2e/phpstan-phpunit-190/test.php -c e2e/phpstan-phpunit-190/t...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-5 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-5 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-5 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-2 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-2 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Result cache E2E tests (cd e2e/result-cache-2 echo -n > phpstan-baseline.neon ../../bin/phpstan -...

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Compiler Tests

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Compiler Tests

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Compiler Tests

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.1)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Integration tests (ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Integration tests (ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Integration tests (ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.2, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.2, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.2, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.1, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.1, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.1, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.3, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.3, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.3, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.0, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.0, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.0, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.4, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.4, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.4, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.3, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.3, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.3, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests with old PHPUnit (7.2, ubuntu-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests with old PHPUnit (7.2, ubuntu-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests with old PHPUnit (7.2, ubuntu-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Integration tests (windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Integration tests (windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Integration tests (windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.1, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.1, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.1, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.4, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.4, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.4, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.0, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.0, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.0, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.3, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.3, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (7.3, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.3, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.3, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.3, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.2, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.2, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / Tests (8.2, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, windows-latest)

Method RecursiveIteratorIterator::__construct() has parameter $mode with no type specified.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, windows-latest)

PHPDoc tag @param for parameter $flags contains unresolvable type.

Check failure on line 166 in stubs/iterable.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, windows-latest)

PHPDoc tag @param for parameter $mode contains unresolvable type.
$iterator,
Expand Down
10 changes: 10 additions & 0 deletions tests/PHPStan/Rules/Classes/InstantiationRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,4 +461,14 @@ public function testBug9946(): void
$this->analyse([__DIR__ . '/data/bug-9946.php'], []);
}

public function testBug10324(): void
{
$this->analyse([__DIR__ . '/data/bug-10324.php'], [
[
'Parameter #3 $flags of class RecursiveIteratorIterator constructor expects 0|16, 2 given.',
23
]
]);
}

}
33 changes: 33 additions & 0 deletions tests/PHPStan/Rules/Classes/data/bug-10324.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

namespace Bug10324;

use RecursiveIteratorIterator;
use RecursiveDirectoryIterator;

class HelloWorld
{
public function findfile(string $directory, string $filename): ?string
{
$fontPath = null;
$it = new RecursiveDirectoryIterator(
$directory,
RecursiveDirectoryIterator::SKIP_DOTS
| RecursiveDirectoryIterator::FOLLOW_SYMLINKS
);
foreach (
new RecursiveIteratorIterator(
$it,
RecursiveIteratorIterator::LEAVES_ONLY,
//RecursiveIteratorIterator::CATCH_GET_CHILD
RecursiveIteratorIterator::CHILD_FIRST
) as $file
) {
if (basename($file) === $filename) {
$fontPath = $file;
break;
}
}
return $fontPath;
}
}

0 comments on commit 6ae305d

Please sign in to comment.