mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Make the right context get passed
This commit is contained in:
parent
d258e0debd
commit
3112a40258
@ -1411,7 +1411,13 @@ class StatementsChecker
|
||||
ClassMethodChecker::checkMethodExists($method_id, $this->_file_name, $stmt);
|
||||
|
||||
if (!($this->_source->getSource() instanceof TraitChecker)) {
|
||||
ClassMethodChecker::checkMethodVisibility($method_id, $this->_absolute_class, $this->_file_name, $stmt->getLine());
|
||||
$calling_context = $this->_absolute_class;
|
||||
|
||||
if (ClassChecker::getThisClass() && is_subclass_of(ClassChecker::getThisClass(), $this->_absolute_class)) {
|
||||
$calling_context = $this->_absolute_class;
|
||||
}
|
||||
|
||||
ClassMethodChecker::checkMethodVisibility($method_id, $calling_context, $this->_file_name, $stmt->getLine());
|
||||
}
|
||||
|
||||
$return_types = ClassMethodChecker::getMethodReturnTypes($method_id);
|
||||
|
Loading…
Reference in New Issue
Block a user