From bf49055a1ff10b904d62b152cabf21f1e0dc8d15 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Fri, 1 Mar 2024 08:56:07 +0100 Subject: [PATCH] Use enum_exists() for enums --- src/Internal/CriteriaOrderings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Internal/CriteriaOrderings.php b/src/Internal/CriteriaOrderings.php index 1132fa387cf..88ab2a35a43 100644 --- a/src/Internal/CriteriaOrderings.php +++ b/src/Internal/CriteriaOrderings.php @@ -8,7 +8,7 @@ use Doctrine\Common\Collections\Order; use function array_map; -use function class_exists; +use function enum_exists; use function method_exists; use function strtoupper; @@ -38,7 +38,7 @@ private static function getCriteriaOrderings(Criteria $criteria): array */ private static function mapToOrderEnumIfAvailable(array $orderings): array { - if (! class_exists(Order::class)) { + if (! enum_exists(Order::class)) { return $orderings; }