1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 12:24:49 +01:00

Add support for checking var dumps

This commit is contained in:
Matthew Brown 2016-01-11 17:23:05 -05:00
parent 2ebca32e32
commit 9a2d5c741f

View File

@ -14,11 +14,16 @@ class FileChecker
protected static $_cache_dir = null;
protected static $_file_checkers = [];
protected static $_ignore_var_dump_files = [];
public static $show_notices = true;
public function __construct($file_name)
public function __construct($file_name, $check_var_dumps = true)
{
$this->_file_name = $file_name;
if (!$check_var_dumps) {
self::$_ignore_var_dump_files[$this->_file_name] = 1;
}
}
public function check($check_classes = true)
@ -141,4 +146,9 @@ class FileChecker
{
self::$_cache_dir = $cache_dir;
}
public static function shouldCheckVarDumps($file_name)
{
return isset(self::$_ignore_var_dump_files[$file_name]);
}
}