mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix checkWithClass implementation
This commit is contained in:
parent
c56ec0b911
commit
4f65d48c42
@ -81,7 +81,11 @@ class FileChecker implements StatementsSource
|
||||
|
||||
$class_method = new PhpParser\Node\Stmt\ClassMethod($class_name, ['stmts' => $stmts]);
|
||||
|
||||
(new ClassMethodChecker($class_method, $this))->check();
|
||||
$class = new PhpParser\Node\Stmt\Class_($class_name);
|
||||
|
||||
$class_checker = new ClassChecker($class, $this, $class_name);
|
||||
|
||||
(new ClassMethodChecker($class_method, $class_checker))->check();
|
||||
}
|
||||
|
||||
public static function getAbsoluteClassFromNameInFile($class, $namespace, $file_name)
|
||||
@ -223,11 +227,13 @@ class FileChecker implements StatementsSource
|
||||
return $argument_offset < count($this->_function_params[$function_name]) && $this->_function_params[$function_name][$argument_offset];
|
||||
}
|
||||
|
||||
public static function checkClassPropertiesFor(callable $fn) {
|
||||
public static function checkClassPropertiesFor(callable $fn)
|
||||
{
|
||||
self::$_class_property_fn = $fn;
|
||||
}
|
||||
|
||||
public static function checkVarDumpsFor(callable $fn) {
|
||||
public static function checkVarDumpsFor(callable $fn)
|
||||
{
|
||||
self::$_var_dump_fn = $fn;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user