mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Remove some unnecessary code
This commit is contained in:
parent
e130dd9b1c
commit
48b702b76a
@ -120,9 +120,6 @@ class LoopAnalyzer
|
||||
|
||||
$continue_context->loop_scope = $loop_scope;
|
||||
|
||||
$old_referenced_var_ids = $continue_context->referenced_var_ids;
|
||||
$continue_context->referenced_var_ids = [];
|
||||
|
||||
foreach ($pre_conditions as $condition_offset => $pre_condition) {
|
||||
self::applyPreConditionToLoopContext(
|
||||
$statements_analyzer,
|
||||
@ -150,8 +147,6 @@ class LoopAnalyzer
|
||||
}
|
||||
}
|
||||
|
||||
$continue_context->referenced_var_ids = $old_referenced_var_ids + $continue_context->referenced_var_ids;
|
||||
|
||||
$loop_parent_context->vars_possibly_in_scope = array_merge(
|
||||
$continue_context->vars_possibly_in_scope,
|
||||
$loop_parent_context->vars_possibly_in_scope
|
||||
@ -191,9 +186,6 @@ class LoopAnalyzer
|
||||
|
||||
$continue_context->loop_scope = $loop_scope;
|
||||
|
||||
$old_referenced_var_ids = $continue_context->referenced_var_ids;
|
||||
$continue_context->referenced_var_ids = [];
|
||||
|
||||
$continue_context->protected_var_ids = $loop_scope->protected_var_ids;
|
||||
|
||||
$statements_analyzer->analyze($stmts, $continue_context);
|
||||
@ -228,11 +220,6 @@ class LoopAnalyzer
|
||||
}
|
||||
}
|
||||
|
||||
$continue_context->referenced_var_ids = array_intersect_key(
|
||||
$old_referenced_var_ids,
|
||||
$continue_context->referenced_var_ids
|
||||
);
|
||||
|
||||
$recorded_issues = IssueBuffer::clearRecordingLevel();
|
||||
IssueBuffer::stopRecording();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user