Skip to content

Commit

Permalink
[ci-review] Rector Rectify
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 4, 2022
1 parent 1631975 commit 2fa45d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/NodeCollector/BinaryOpTreeRootLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function findOperationRoot(Expr $expr, string $binaryOpClass): Expr
if (! $parentNode instanceof Expr) {
return $expr;
}

if ($parentNode::class !== $binaryOpClass) {
return $expr;
}
Expand All @@ -38,6 +39,7 @@ public function findOperationRoot(Expr $expr, string $binaryOpClass): Expr
if ($isLeftChild) {
return $this->findOperationRoot($parentNode, $binaryOpClass);
}

if ($isRightChildAndNotBinaryOp) {
return $this->findOperationRoot($parentNode, $binaryOpClass);
}
Expand Down

0 comments on commit 2fa45d5

Please sign in to comment.