diff --git a/src/Psalm/Internal/Scope/CaseScope.php b/src/Psalm/Internal/Scope/CaseScope.php index 220ac60e5..fa921007e 100644 --- a/src/Psalm/Internal/Scope/CaseScope.php +++ b/src/Psalm/Internal/Scope/CaseScope.php @@ -26,6 +26,6 @@ class CaseScope public function __destruct() { - $this->parent_context = null; + unset($this->parent_context); } } diff --git a/src/Psalm/Internal/Scope/LoopScope.php b/src/Psalm/Internal/Scope/LoopScope.php index aa4092df4..2bbfe903b 100644 --- a/src/Psalm/Internal/Scope/LoopScope.php +++ b/src/Psalm/Internal/Scope/LoopScope.php @@ -67,7 +67,7 @@ class LoopScope public function __destruct() { - $this->loop_context = null; - $this->loop_parent_context = null; + unset($this->loop_context); + unset($this->loop_parent_context); } }