Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko authored and github-actions[bot] committed Dec 14, 2024
1 parent a098c55 commit 8baa2de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function enum(Type $_, Enum $rule)
if ($except || $only) {
$cases = collect($enumName::cases())
->reject(fn ($case) => in_array($case, $except))
->filter(fn ($case) => !$only || in_array($case, $only));
->filter(fn ($case) => ! $only || in_array($case, $only));

if (! isset($cases->first()?->value)) {
return new UnknownType("$enumName enum doesnt have values (only/except context)");
Expand Down
4 changes: 2 additions & 2 deletions tests/ValidationRulesDocumentingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function validationRulesToDocumentationWithDeep(array $rules)
'enum' => [
'draft',
'archived',
]
],
]);
});

Expand All @@ -108,7 +108,7 @@ function validationRulesToDocumentationWithDeep(array $rules)
'enum' => [
'published',
'archived',
]
],
]);
});

Expand Down

0 comments on commit 8baa2de

Please sign in to comment.