1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Fix method storage fetching

This commit is contained in:
adrew 2022-01-01 13:33:00 +03:00
parent 29af83bf61
commit 0f69483cc1

View File

@ -190,6 +190,8 @@ class ExistingAtomicMethodCallAnalyzer extends CallAnalyzer
}
}
$declaring_method_id = $codebase->methods->getDeclaringMethodId($method_id);
try {
$method_storage = $codebase->methods->getStorage($declaring_method_id ?? $method_id);
} catch (UnexpectedValueException $e) {
@ -240,8 +242,6 @@ class ExistingAtomicMethodCallAnalyzer extends CallAnalyzer
return Type::getMixed();
}
$declaring_method_id = $codebase->methods->getDeclaringMethodId($method_id);
$return_type_candidate = MethodCallReturnTypeFetcher::fetch(
$statements_analyzer,
$codebase,