1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Skip sub directories when parsing stubs

We now have the extensions in a sub directory and therefore have to skip
that one.
This commit is contained in:
Christian Schiffler 2022-07-04 11:36:32 +02:00
parent ce4ba69e70
commit a8f2b2b85a

View File

@ -50,6 +50,9 @@ foreach (new RecursiveDirectoryIterator(
__DIR__ . '/../stubs',
FilesystemIterator::CURRENT_AS_PATHNAME|FilesystemIterator::SKIP_DOTS
) as $file) {
if (is_dir($file)) {
continue;
}
$contents = file_get_contents($file);
$stmts = $parser->parse($contents);
$stmts = $traverser->traverse($stmts);