Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 11, 2024
1 parent 3b1435f commit 7a3d63c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use PhpParser\Node\Expr\ArrowFunction;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\AssignOp;
use PhpParser\Node\Expr\AssignRef;
use PhpParser\Node\Expr\BinaryOp;
use PhpParser\Node\Expr\BitwiseNot;
use PhpParser\Node\Expr\BooleanNot;
Expand Down Expand Up @@ -231,7 +232,7 @@ public function processNodes(
return;
}

if ($node instanceof Assign || $node instanceof AssignOp) {
if ($node instanceof Assign || $node instanceof AssignOp || $node instanceof AssignRef) {
$this->processAssign($node, $mutatingScope);

if ($node->var instanceof Variable && $node->var->name instanceof Expr) {
Expand Down Expand Up @@ -432,7 +433,7 @@ private function processCallike(CallLike $callLike, MutatingScope $mutatingScope
}
}

private function processAssign(Assign|AssignOp $assign, MutatingScope $mutatingScope): void
private function processAssign(Assign|AssignOp|AssignRef $assign, MutatingScope $mutatingScope): void
{
$assign->var->setAttribute(AttributeKey::SCOPE, $mutatingScope);
$assign->expr->setAttribute(AttributeKey::SCOPE, $mutatingScope);
Expand Down

0 comments on commit 7a3d63c

Please sign in to comment.