mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Improve accuracy of messages
This commit is contained in:
parent
3f5cb4db1f
commit
b0c3f09c29
@ -134,7 +134,8 @@ class AndAnalyzer
|
||||
$statements_analyzer,
|
||||
[],
|
||||
$context->inside_loop,
|
||||
new CodeLocation($statements_analyzer->getSource(), $stmt->left)
|
||||
new CodeLocation($statements_analyzer->getSource(), $stmt->left),
|
||||
$context->inside_negation
|
||||
);
|
||||
|
||||
$right_context->vars_in_scope = $right_vars_in_scope;
|
||||
|
@ -189,7 +189,7 @@ class OrAnalyzer
|
||||
[],
|
||||
$left_context->inside_loop,
|
||||
new CodeLocation($statements_analyzer->getSource(), $stmt->left),
|
||||
true
|
||||
!$context->inside_negation
|
||||
);
|
||||
$right_context->vars_in_scope = $right_vars_in_scope;
|
||||
}
|
||||
@ -270,7 +270,8 @@ class OrAnalyzer
|
||||
$statements_analyzer,
|
||||
[],
|
||||
$left_context->inside_loop,
|
||||
new CodeLocation($statements_analyzer->getSource(), $stmt->right)
|
||||
new CodeLocation($statements_analyzer->getSource(), $stmt->right),
|
||||
$context->inside_negation
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user