mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Throw exception if impossible state is reached
This commit is contained in:
parent
73694ab04e
commit
6531e3bfb8
@ -2056,6 +2056,11 @@ class CallChecker
|
||||
|
||||
if (strpos($function_id, '::')) {
|
||||
$declaring_method_id = MethodChecker::getDeclaringMethodId($project_checker, $function_id);
|
||||
|
||||
if (!$declaring_method_id) {
|
||||
throw new \UnexpectedValueException('This should never happen');
|
||||
}
|
||||
|
||||
$function_storage = MethodChecker::getStorage($project_checker, $declaring_method_id);
|
||||
} else {
|
||||
$function_storage = FunctionChecker::getStorage($statements_checker, $function_id);
|
||||
|
Loading…
Reference in New Issue
Block a user