mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 10:38:49 +01:00
qa: ensure we use multiple isset
to verify the existence of $arg_var_id
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
parent
c68b6e9d26
commit
6c1ed90dc1
@ -793,10 +793,10 @@ class CallAnalyzer
|
||||
);
|
||||
}
|
||||
}
|
||||
} else if (isset($arg_var_id, $context->vars_in_scope[$arg_var_id])) {
|
||||
} elseif (isset($arg_var_id) && isset($context->vars_in_scope[$arg_var_id])) {
|
||||
$other_type = $context->vars_in_scope[$arg_var_id];
|
||||
if (self::isNewTypeNarrowingDownOldType($other_type, $union)) {
|
||||
foreach($union->getAtomicTypes() as $atomic_type) {
|
||||
foreach ($union->getAtomicTypes() as $atomic_type) {
|
||||
if ($assertion_type instanceof TTemplateParam
|
||||
&& $assertion_type->as->getId() === $atomic_type->getId()
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user