mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix $function_id when checking for method existence
This commit is contained in:
parent
cc19f50c04
commit
6fbd8753d5
@ -957,10 +957,10 @@ class CallChecker
|
||||
return;
|
||||
}
|
||||
|
||||
$function_id = $callable_fq_class_name . '::' . $method_name;
|
||||
|
||||
try {
|
||||
$method_storage = $codebase->methods->getStorage(
|
||||
$callable_fq_class_name . '::' . $method_name
|
||||
);
|
||||
$method_storage = $codebase->methods->getStorage($function_id);
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
// the method may not exist, but we're suppressing that issue
|
||||
return;
|
||||
@ -1380,7 +1380,7 @@ class CallChecker
|
||||
|
||||
foreach ($function_ids as $function_id) {
|
||||
if (strpos($function_id, '::') !== false) {
|
||||
list($callable_fq_class_name) = explode('::', $function_id);
|
||||
list($callable_fq_class_name, $method_name) = explode('::', $function_id);
|
||||
|
||||
switch ($callable_fq_class_name) {
|
||||
case 'self':
|
||||
@ -1399,6 +1399,8 @@ class CallChecker
|
||||
$callable_fq_class_name = $container_class;
|
||||
}
|
||||
|
||||
$function_id = $callable_fq_class_name . '::' . $method_name;
|
||||
|
||||
if (ClassLikeChecker::checkFullyQualifiedClassLikeName(
|
||||
$statements_checker,
|
||||
$callable_fq_class_name,
|
||||
|
Loading…
Reference in New Issue
Block a user