From 7fde28c4d442d90ece0b4f17bab843dc2cf291b2 Mon Sep 17 00:00:00 2001 From: klkvsk Date: Wed, 1 Nov 2023 09:05:42 +0300 Subject: [PATCH] 5984 fix finding selected enum value in choices (linter) --- src/Field/Configurator/ChoiceConfigurator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Field/Configurator/ChoiceConfigurator.php b/src/Field/Configurator/ChoiceConfigurator.php index d006cecda9..bea68d4c3d 100644 --- a/src/Field/Configurator/ChoiceConfigurator.php +++ b/src/Field/Configurator/ChoiceConfigurator.php @@ -107,7 +107,7 @@ public function configure(FieldDto $field, EntityDto $entityDto, AdminContext $c // Translatable choice don't need to get flipped $flippedChoices = $areChoicesTranslatable ? $choices : array_flip($this->flatten($choices)); foreach ((array) $fieldValue as $selectedValue) { - $selectedValue = match(true) { + $selectedValue = match (true) { $selectedValue instanceof \BackedEnum => $selectedValue->value, $selectedValue instanceof \UnitEnum => $selectedValue->name, default => $selectedValue