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:
parent
966479387f
commit
dbf5628683
@ -404,13 +404,16 @@ class MethodCallAnalyzer extends \Psalm\Internal\Analyzer\Statements\Expression\
|
|||||||
$context->vars_in_scope[$lhs_var_id] = $class_type;
|
$context->vars_in_scope[$lhs_var_id] = $class_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Always defined? Always correct?
|
if ($lhs_var_id) {
|
||||||
$method_id = $result->existent_method_ids[0];
|
// TODO: Always defined? Always correct?
|
||||||
// TODO: When should a method have a storage?
|
/** @var \Psalm\Internal\MethodIdentifier */
|
||||||
if ($codebase->methods->hasStorage($method_id)) {
|
$method_id = $result->existent_method_ids[0];
|
||||||
$storage = $codebase->methods->getStorage($method_id);
|
// TODO: When should a method have a storage?
|
||||||
if ($storage->self_out_type) {
|
if ($codebase->methods->hasStorage($method_id)) {
|
||||||
$context->vars_in_scope[$lhs_var_id] = $storage->self_out_type;
|
$storage = $codebase->methods->getStorage($method_id);
|
||||||
|
if ($storage->self_out_type) {
|
||||||
|
$context->vars_in_scope[$lhs_var_id] = $storage->self_out_type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user