mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: fix cs
This commit is contained in:
@@ -58,7 +58,7 @@ class CustomFieldLongChoice extends AbstractCustomField
|
||||
$translatableStringHelper = $this->translatableStringHelper;
|
||||
$builder->add($customField->getSlug(), Select2ChoiceType::class, [
|
||||
'choices' => $entries,
|
||||
'choice_label' => static fn(Option $option) => $translatableStringHelper->localize($option->getText()),
|
||||
'choice_label' => static fn (Option $option) => $translatableStringHelper->localize($option->getText()),
|
||||
'choice_value' => static fn (Option $key): ?int => null === $key ? null : $key->getId(),
|
||||
'multiple' => false,
|
||||
'expanded' => false,
|
||||
|
@@ -57,6 +57,6 @@ class OptionRepository extends EntityRepository
|
||||
->getQuery()
|
||||
->getScalarResult();
|
||||
|
||||
return array_map(static fn($r) => $r['key'], $keys);
|
||||
return array_map(static fn ($r) => $r['key'], $keys);
|
||||
}
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ class CustomFieldType extends AbstractType
|
||||
if ('entity' === $options['group_widget']) {
|
||||
$builder->add('customFieldsGroup', EntityType::class, [
|
||||
'class' => 'ChillCustomFieldsBundle:CustomFieldsGroup',
|
||||
'choice_label' => fn($g) => $this->translatableStringHelper->localize($g->getName()),
|
||||
'choice_label' => fn ($g) => $this->translatableStringHelper->localize($g->getName()),
|
||||
]);
|
||||
} elseif ('hidden' === $options['group_widget']) {
|
||||
$builder->add('customFieldsGroup', HiddenType::class);
|
||||
|
@@ -38,7 +38,7 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface
|
||||
|
||||
// @TODO: in the array_map callback, CustomField::getLabel() does not exist. What do we do here?
|
||||
$customFieldsLablels = array_map(
|
||||
static fn($e) => $e->getLabel(),
|
||||
static fn ($e) => $e->getLabel(),
|
||||
$customFields
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user