Skip to content

Commit

Permalink
Fix fatal error when autoloader open directories
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored and ondrejmirtes committed Dec 29, 2022
1 parent ab27d89 commit 46c970f
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -3,6 +3,7 @@
namespace PHPStan\Reflection\BetterReflection\SourceLocator;

use PHPStan\ShouldNotHappenException;
use function is_dir;
use function is_file;
use function stat;
use function stream_resolve_include_path;
Expand Down Expand Up @@ -259,4 +260,14 @@ public function stream_set_option($option, $arg1, $arg2): bool
return false;
}

public function dir_opendir(string $path, int $options): bool
{
return is_dir($path);
}

public function dir_readdir(): string
{
return '';
}

}

0 comments on commit 46c970f

Please sign in to comment.