mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fall back to $method_id if no defining method id found
This commit is contained in:
parent
313a010355
commit
759516d01f
@ -506,7 +506,9 @@ class MethodCallChecker extends \Psalm\Checker\Statements\Expression\CallChecker
|
||||
continue;
|
||||
}
|
||||
|
||||
$call_map_id = strtolower((string)$codebase->methods->getDeclaringMethodId($method_id));
|
||||
$call_map_id = strtolower(
|
||||
$codebase->methods->getDeclaringMethodId($method_id) ?: $method_id
|
||||
);
|
||||
|
||||
if ($method_name_lc === '__tostring') {
|
||||
$return_type_candidate = Type::getString();
|
||||
|
Loading…
Reference in New Issue
Block a user