Skip to content

Commit

Permalink
Use enum_exists() for enums
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Mar 1, 2024
1 parent 694413a commit bf49055
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Internal/CriteriaOrderings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit bf49055

Please sign in to comment.