From 9a2d5c741fff832915c0d53341213dd40bc2ceb9 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Mon, 11 Jan 2016 17:23:05 -0500 Subject: [PATCH] Add support for checking var dumps --- lib/FileChecker.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/FileChecker.php b/lib/FileChecker.php index 9d4c4ba7a..bc9a161e3 100644 --- a/lib/FileChecker.php +++ b/lib/FileChecker.php @@ -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]); + } }