Skip to content

Commit

Permalink
Add check for first class callable in CriteriaOrderingRector
Browse files Browse the repository at this point in the history
  • Loading branch information
julienfastre committed Aug 26, 2024
1 parent f4a0882 commit d510cd5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ private function refactorMethodCall(Node\Expr\MethodCall $node): ?Node
return null;
}

if ($node->isFirstClassCallable()) {
return null;
}

$isSuperTypeOfCriteria = $this->criteriaObjectType->isSuperTypeOf($this->nodeTypeResolver->getType($node->var));

if ($isSuperTypeOfCriteria->no() || $isSuperTypeOfCriteria->maybe()) {
Expand Down

0 comments on commit d510cd5

Please sign in to comment.