diff --git a/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php b/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php index d8f34589..fd0b4131 100644 --- a/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php +++ b/src/Support/OperationExtensions/RulesExtractor/RulesMapper.php @@ -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)"); diff --git a/tests/ValidationRulesDocumentingTest.php b/tests/ValidationRulesDocumentingTest.php index ccc2db1a..cf2971ab 100644 --- a/tests/ValidationRulesDocumentingTest.php +++ b/tests/ValidationRulesDocumentingTest.php @@ -92,7 +92,7 @@ function validationRulesToDocumentationWithDeep(array $rules) 'enum' => [ 'draft', 'archived', - ] + ], ]); }); @@ -108,7 +108,7 @@ function validationRulesToDocumentationWithDeep(array $rules) 'enum' => [ 'published', 'archived', - ] + ], ]); });