mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-08 15:54:59 +00:00
DX: rector rules upt to PHP 74
This commit is contained in:
@@ -70,9 +70,7 @@ class CustomFieldType extends AbstractType
|
||||
if ('entity' === $options['group_widget']) {
|
||||
$builder->add('customFieldsGroup', EntityType::class, [
|
||||
'class' => 'ChillCustomFieldsBundle:CustomFieldsGroup',
|
||||
'choice_label' => function ($g) {
|
||||
return $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,9 +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 function ($e) {
|
||||
return $e->getLabel();
|
||||
},
|
||||
static fn($e) => $e->getLabel(),
|
||||
$customFields
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user