diff --git a/src/CodeInspector/FileChecker.php b/src/CodeInspector/FileChecker.php index f74766cf4..146e01929 100644 --- a/src/CodeInspector/FileChecker.php +++ b/src/CodeInspector/FileChecker.php @@ -167,9 +167,9 @@ class FileChecker implements StatementsSource return !self::$_class_property_fn || call_user_func(self::$_class_property_fn, $file_name, $class_checker); } - public function registerFunction(PhpParser\Node\Stmt\Function_ $function, $absolute_class = null) + public function registerFunction(PhpParser\Node\Stmt\Function_ $function) { - $function_name = ($absolute_class ? $absolute_class . '::' : '') . $function->name; + $function_name = $function->name; $this->_function_params[$function_name] = []; diff --git a/src/CodeInspector/StatementsChecker.php b/src/CodeInspector/StatementsChecker.php index 76f3c10d0..f7afe12b9 100644 --- a/src/CodeInspector/StatementsChecker.php +++ b/src/CodeInspector/StatementsChecker.php @@ -66,7 +66,7 @@ class StatementsChecker foreach ($stmts as $stmt) { if ($stmt instanceof PhpParser\Node\Stmt\Function_) { $file_checker = FileChecker::getFileCheckerFromFileName($this->_file_name); - $file_checker->registerFunction($stmt, $this->_absolute_class); + $file_checker->registerFunction($stmt); } }