Skip to content

Commit f8db0ec

Browse files
committed
Handle include paths
1 parent 8ea25b8 commit f8db0ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Rules/Keywords/RequireFileExistsRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
use PHPStan\Rules\Rule;
1010
use PHPStan\Rules\RuleErrorBuilder;
1111
use PHPStan\ShouldNotHappenException;
12-
use function is_file;
1312
use function sprintf;
1413
use function str_replace;
14+
use function stream_resolve_include_path;
1515

1616
/**
1717
* @implements Rule<Include_>
@@ -30,7 +30,7 @@ public function processNode(Node $node, Scope $scope): array
3030
$paths = $this->resolveFilePaths($node, $scope);
3131

3232
foreach ($paths as $path) {
33-
if (is_file($path)) {
33+
if (stream_resolve_include_path($path)) {
3434
continue;
3535
}
3636

0 commit comments

Comments
 (0)