Skip to content

Commit bf49055

Browse files
committed
Use enum_exists() for enums
1 parent 694413a commit bf49055

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Internal/CriteriaOrderings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Doctrine\Common\Collections\Order;
99

1010
use function array_map;
11-
use function class_exists;
11+
use function enum_exists;
1212
use function method_exists;
1313
use function strtoupper;
1414

@@ -38,7 +38,7 @@ private static function getCriteriaOrderings(Criteria $criteria): array
3838
*/
3939
private static function mapToOrderEnumIfAvailable(array $orderings): array
4040
{
41-
if (! class_exists(Order::class)) {
41+
if (! enum_exists(Order::class)) {
4242
return $orderings;
4343
}
4444

0 commit comments

Comments
 (0)