From 0e30eb48417bf99caf23a9fa84cf39c86a880820 Mon Sep 17 00:00:00 2001 From: Theodore Brown Date: Fri, 19 Jan 2024 15:08:53 -0600 Subject: [PATCH] Remove pointless assignment which is overwritten a few lines later --- .../Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php index 2a2be74606f..cc3e9c2cde1 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/IfElse/IfAnalyzer.php @@ -167,12 +167,12 @@ public static function analyze( $outer_context->removeVarFromConflictingClauses($var_id); } - $if_scope->if_actions = $final_actions = ScopeAnalyzer::getControlActions( + $final_actions = ScopeAnalyzer::getControlActions( $stmt->stmts, $statements_analyzer->node_data, [], ); - + // has a return/throw at end $has_ending_statements = $final_actions === [ScopeAnalyzer::ACTION_END]; $has_leaving_statements = $has_ending_statements