Skip to content

Commit a4325dd

Browse files
staabmondrejmirtes
authored andcommitted
Less expression printing
1 parent 809c6ba commit a4325dd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Analyser/MutatingScope.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4484,14 +4484,13 @@ public function invalidateExpression(Expr $expressionToInvalidate, bool $require
44844484

44854485
private function shouldInvalidateExpression(string $exprStringToInvalidate, Expr $exprToInvalidate, Expr $expr, bool $requireMoreCharacters = false): bool
44864486
{
4487-
$exprString = $this->getNodeKey($expr);
4488-
if ($requireMoreCharacters && $exprStringToInvalidate === $exprString) {
4487+
if ($requireMoreCharacters && $exprStringToInvalidate === $this->getNodeKey($expr)) {
44894488
return false;
44904489
}
44914490

44924491
// Variables will not contain traversable expressions. skip the NodeFinder overhead
44934492
if ($expr instanceof Variable && is_string($expr->name) && !$requireMoreCharacters) {
4494-
return $exprStringToInvalidate === $exprString;
4493+
return $exprStringToInvalidate === $this->getNodeKey($expr);
44954494
}
44964495

44974496
$nodeFinder = new NodeFinder();

0 commit comments

Comments
 (0)