Skip to content

Commit

Permalink
Remove some unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Feb 8, 2022
1 parent e130dd9 commit 48b702b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ public static function analyze(

$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,
Expand Down Expand Up @@ -150,8 +147,6 @@ public static function analyze(
}
}

$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
Expand Down Expand Up @@ -191,9 +186,6 @@ public static function analyze(

$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);
Expand Down Expand Up @@ -228,11 +220,6 @@ public static function analyze(
}
}

$continue_context->referenced_var_ids = array_intersect_key(
$old_referenced_var_ids,
$continue_context->referenced_var_ids
);

$recorded_issues = IssueBuffer::clearRecordingLevel();
IssueBuffer::stopRecording();

Expand Down

0 comments on commit 48b702b

Please sign in to comment.