Skip to content

Commit

Permalink
remove unnecessary unset()
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 3, 2023
1 parent 5ed3fea commit 1cf1a08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions src/Analyser/MutatingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -3850,10 +3850,6 @@ public function filterBySpecifiedTypes(SpecifiedTypes $specifiedTypes): self
);
} else {
$scope = $scope->unsetExpression($expr);
$exprString = $this->getNodeKey($expr);

unset($scope->expressionTypes[$exprString]);
unset($scope->nativeExpressionTypes[$exprString]);
}

continue;
Expand Down
1 change: 1 addition & 0 deletions tests/PHPStan/Analyser/data/falsey-isset-certainty.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ function falseySubtractedMixedIssetVariable(): void

assertVariableCertainty(TrinaryLogic::createMaybe(), $a);
}

function falseyIssetWithAssignment(): void
{
if (rand() % 2) {
Expand Down

0 comments on commit 1cf1a08

Please sign in to comment.