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:
parent
079ddb66ee
commit
acf16db64f
@ -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] = [];
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user