[TOOLS] Fix errors pointed out by PHPStan level 4
This commit is contained in:
@@ -90,7 +90,6 @@ class ModuleManager
|
||||
function (string $method) use ($obj) {
|
||||
if (((string) (new ReflectionMethod($obj, $method))->getReturnType()) !== 'EventResult') {
|
||||
$class = $obj::class;
|
||||
dd("Return type of {$class}::{$method} is not the required EventResult");
|
||||
throw new BugFoundException("Return type of {$class}::{$method} is not the required EventResult");
|
||||
}
|
||||
$event_name = mb_substr($method, 2);
|
||||
@@ -183,7 +182,7 @@ class ModuleManager
|
||||
} else {
|
||||
$rdi = new AppendIterator();
|
||||
$rdi->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(INSTALLDIR . '/components', FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS)));
|
||||
$rdi->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(INSTALLDIR . '/plugins', FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS)));
|
||||
$rdi->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator(INSTALLDIR . '/plugins', FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS)));
|
||||
$time = file_exists(MODULE_CACHE_FILE) ? filemtime(MODULE_CACHE_FILE) : 0;
|
||||
|
||||
if ($_ENV['APP_ENV'] === 'test' || F\some($rdi, fn ($e) => $e->getMTime() > $time)) {
|
||||
|
Reference in New Issue
Block a user