diff --git a/rules/Collection22/Rector/CriteriaOrderingConstantsDeprecationRector.php b/rules/Collection22/Rector/CriteriaOrderingConstantsDeprecationRector.php index 12abdbb9..57a5cce9 100644 --- a/rules/Collection22/Rector/CriteriaOrderingConstantsDeprecationRector.php +++ b/rules/Collection22/Rector/CriteriaOrderingConstantsDeprecationRector.php @@ -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()) {