Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Dec 16, 2024
1 parent fc076da commit 043ef28
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ public function refactor(Node $node): ?Node
}

$oldTokens = $this->file->getOldTokens();
if (isset($oldTokens[$node->getStartTokenPos()]) && (string) $oldTokens[$node->getStartTokenPos()] === '(') {
$startTokenPos = $node->getStartTokenPos();
$endTokenPos = $node->getEndTokenPos();

if (! isset($oldTokens[$startTokenPos], $oldTokens[$endTokenPos])) {
return null;
}

if ((string) $oldTokens[$node->getStartTokenPos()] === '(') {
return null;
}

Expand Down

0 comments on commit 043ef28

Please sign in to comment.