Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4367,13 +4367,19 @@ function (MutatingScope $scope) use ($stmt, $expr, $nodeCallback, $context, $sto
ksort($armNodes, SORT_NUMERIC);

$this->callNodeCallback($nodeCallback, new MatchExpressionNode($expr->cond, array_values($armNodes), $expr, $matchScope), $scope, $storage);

if ($expr->cond instanceof AlwaysRememberedExpr) {
$expr->cond = $expr->cond->getExpr();
}
} elseif ($expr instanceof AlwaysRememberedExpr) {
$result = $this->processExprNode($stmt, $expr->getExpr(), $scope, $storage, $nodeCallback, $context);
$hasYield = $result->hasYield();
$throwPoints = $result->getThrowPoints();
$impurePoints = $result->getImpurePoints();
$isAlwaysTerminating = $result->isAlwaysTerminating();
$scope = $result->getScope();

$expr = $expr->getExpr();
} elseif ($expr instanceof Expr\Throw_) {
$hasYield = false;
$result = $this->processExprNode($stmt, $expr->expr, $scope, $storage, $nodeCallback, ExpressionContext::createDeep());
Expand Down
2 changes: 0 additions & 2 deletions src/Analyser/RuleErrorTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use PHPStan\Fixable\PhpPrinter;
use PHPStan\Fixable\PhpPrinterIndentationDetectorVisitor;
use PHPStan\Fixable\ReplacingNodeVisitor;
use PHPStan\Fixable\UnwrapVirtualNodesVisitor;
use PHPStan\Node\VirtualNode;
use PHPStan\Rules\FileRuleError;
use PHPStan\Rules\FixableNodeRuleError;
Expand Down Expand Up @@ -124,7 +123,6 @@ public function transform(
$indentTraverser->traverse($fileNodes);

$cloningTraverser = new NodeTraverser();
$cloningTraverser->addVisitor(new UnwrapVirtualNodesVisitor());
$cloningTraverser->addVisitor(new CloningVisitor());

/** @var Stmt[] $newStmts */
Expand Down
29 changes: 0 additions & 29 deletions src/Fixable/UnwrapVirtualNodesVisitor.php

This file was deleted.

Loading