Skip to content

Commit

Permalink
[Naming] Improve performance by using findFirst() for casted to (bool…
Browse files Browse the repository at this point in the history
…) on BreakingVariableRenameGuard (#3703)
  • Loading branch information
samsonasik committed Apr 29, 2023
1 parent 31f64cc commit 28712b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rules/Naming/Guard/BreakingVariableRenameGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function shouldSkipParam(
return true;
}

return (bool) $this->betterNodeFinder->find((array) $classMethod->getStmts(), function (Node $node) use (
return (bool) $this->betterNodeFinder->findFirst((array) $classMethod->getStmts(), function (Node $node) use (
$expectedName
): bool {
if (! $node instanceof Variable) {
Expand Down

0 comments on commit 28712b9

Please sign in to comment.