1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

View function declarations are not methods

This commit is contained in:
Matthew Brown 2016-04-17 14:48:57 -04:00
parent 079ddb66ee
commit acf16db64f
2 changed files with 3 additions and 3 deletions

View File

@ -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] = [];

View File

@ -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);
}
}