Skip to content

Commit

Permalink
[rector] Rector fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to authored and github-actions[bot] committed Sep 21, 2023
1 parent 55a576e commit 8065d31
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Fields/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ public function attach(string $class): static
$values = collect($class::cases());

$this->options(
$values->mapWithKeys(function($value) {
return [
$value->name => method_exists($value, 'toString')
? $value->toString()
: $value->value
];
})->toArray()
$values->mapWithKeys(fn($value): array => [
$value->name => method_exists($value, 'toString')
? $value->toString()
: $value->value
])->toArray()
);

return $this;
Expand Down

0 comments on commit 8065d31

Please sign in to comment.