mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Use correct paths
This commit is contained in:
parent
f8fda8febb
commit
2b8c95a19d
@ -23,7 +23,7 @@ class ProjectChecker
|
||||
$base_dir = $config->getBaseDir();
|
||||
|
||||
/** @var RecursiveDirectoryIterator */
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($base_dir . '/' . $dir_name));
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($base_dir . $dir_name));
|
||||
$iterator->rewind();
|
||||
|
||||
$files = [];
|
||||
@ -62,16 +62,18 @@ class ProjectChecker
|
||||
|
||||
$config = Config::getInstance();
|
||||
|
||||
$base_dir = $config->getBaseDir();
|
||||
|
||||
$extension = array_pop(explode('.', $file_name));
|
||||
|
||||
$filetype_handlers = $config->getFiletypeHandlers();
|
||||
|
||||
if (isset($filetype_handlers[$extension])) {
|
||||
/** @var FileChecker */
|
||||
$file_checker = new $filetype_handlers[$extension]($file_name);
|
||||
$file_checker = new $filetype_handlers[$extension]($base_dir . $file_name);
|
||||
}
|
||||
else {
|
||||
$file_checker = new FileChecker($file_name);
|
||||
$file_checker = new FileChecker($base_dir . $file_name);
|
||||
}
|
||||
|
||||
$file_checker->check(true);
|
||||
|
Loading…
Reference in New Issue
Block a user