From 8065d31f681a35d3ca066300011be002be3880bb Mon Sep 17 00:00:00 2001 From: lee-to Date: Thu, 21 Sep 2023 08:23:40 +0000 Subject: [PATCH] [rector] Rector fixes --- src/Fields/Enum.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Fields/Enum.php b/src/Fields/Enum.php index 5b504e7e9..e80c92873 100644 --- a/src/Fields/Enum.php +++ b/src/Fields/Enum.php @@ -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;