From 3cf19427cd0390f1faa80d5e950be0e5082dd2ec Mon Sep 17 00:00:00 2001 From: Ivan Sidorov Date: Wed, 21 Aug 2024 20:38:37 +0000 Subject: [PATCH] Resolve Fail Test Variable `$var_id` added by commit: Title: Fix #302 - add a way to seal objects with magic properties SHA: a08306973a74c8c93b91a0e2a4061dc80b2b358b Date: 2017-11-17 File: src/Psalm/Checker/Statements/Expression/AssignmentChecker.php Line: 682 After removing the `$var_id` variable, all project tests are successful. --- .../Assignment/InstancePropertyAssignmentAnalyzer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php index bedec945c25..b8c236e087f 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/InstancePropertyAssignmentAnalyzer.php @@ -1087,7 +1087,7 @@ private static function analyzeAtomicAssignment( * If we have an explicit list of all allowed magic properties on the class, and we're * not in that list, fall through */ - if (!$var_id || !$class_storage->hasSealedProperties($codebase->config)) { + if (!$class_storage->hasSealedProperties($codebase->config)) { if (!$context->collect_initializations && !$context->collect_mutations) { self::taintProperty( $statements_analyzer,