Skip to content

Commit

Permalink
do not run failing tests on older API
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko committed Dec 19, 2024
1 parent 74a1822 commit 423dee2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ public function enum(Type $_, Enum $rule)

$objectType = new ObjectType($enumName);

$except = $getProtectedValue($rule, 'except');
$only = $getProtectedValue($rule, 'only');
$except = method_exists(Enum::class, 'except') ? $getProtectedValue($rule, 'except') : [];
$only = method_exists(Enum::class, 'only') ? $getProtectedValue($rule, 'only') : [];

if ($except || $only) {
$cases = collect($enumName::cases())
Expand Down

0 comments on commit 423dee2

Please sign in to comment.