Skip to content

Commit

Permalink
[1.0] Use BetterNodeFinder::resolveNextNode() on DowngradeNegativeStr…
Browse files Browse the repository at this point in the history
…ingOffsetToStrlenRector (#59)

* [V1] Use BetterNodeFinder::resolveNextNode() on DowngradeNegativeStringOffsetToStrlenRector

* Update composer.json
  • Loading branch information
samsonasik committed May 21, 2023
1 parent edea6f8 commit 79bc835
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function refactor(Node $node): ?Node
private function processForStringOrVariableOrProperty(
String_ | Variable | PropertyFetch | StaticPropertyFetch $expr
): ?Expr {
$nextNode = $expr->getAttribute(AttributeKey::NEXT_NODE);
$nextNode = $this->betterNodeFinder->resolveNextNode($expr);
if (! $nextNode instanceof UnaryMinus) {
return null;
}
Expand Down

0 comments on commit 79bc835

Please sign in to comment.