mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix erroneous self-check
This commit is contained in:
parent
c3df70e634
commit
327e3150a2
@ -965,7 +965,13 @@ class ExpressionChecker
|
||||
);
|
||||
}
|
||||
|
||||
if ($return_type->value === 'static' || !$method_id) {
|
||||
$return_type->value = $calling_class;
|
||||
} else {
|
||||
$declaring_method_id = MethodChecker::getDeclaringMethodId($method_id);
|
||||
|
||||
$return_type->value = explode('::', (string)$declaring_method_id)[0];
|
||||
}
|
||||
} elseif ($return_type->value[0] === '$' && $method_id) {
|
||||
$method_params = MethodChecker::getMethodParams($method_id);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user