1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-05 20:48:45 +01:00

Fix some errors

This commit is contained in:
Olle 2020-06-24 22:46:09 +00:00
parent 966479387f
commit dbf5628683

View File

@ -404,7 +404,9 @@ class MethodCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
$context->vars_in_scope[$lhs_var_id] = $class_type;
}
if ($lhs_var_id) {
// TODO: Always defined? Always correct?
/** @var \Psalm\Internal\MethodIdentifier */
$method_id = $result->existent_method_ids[0];
// TODO: When should a method have a storage?
if ($codebase->methods->hasStorage($method_id)) {
@ -413,6 +415,7 @@ class MethodCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
$context->vars_in_scope[$lhs_var_id] = $storage->self_out_type;
}
}
}
return true;
}