mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 22:35:01 +00:00
cs: Enable risky rule static_lambda
.
This commit is contained in:
@@ -88,7 +88,7 @@ class CustomFieldType extends AbstractType
|
||||
'label' => 'Required field',
|
||||
])
|
||||
->add('type', HiddenType::class, ['data' => $options['type']])
|
||||
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
|
||||
->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event) {
|
||||
$customField = $event->getData();
|
||||
$form = $event->getForm();
|
||||
|
||||
|
@@ -55,7 +55,7 @@ class CustomFieldsGroupType extends AbstractType
|
||||
|
||||
$builder->addEventListener(
|
||||
FormEvents::POST_SET_DATA,
|
||||
function (FormEvent $event) use ($customizableEntities, $builder) {
|
||||
static function (FormEvent $event) use ($customizableEntities, $builder) {
|
||||
$form = $event->getForm();
|
||||
$group = $event->getData();
|
||||
|
||||
|
@@ -32,7 +32,7 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface
|
||||
|
||||
// @TODO: in the array_map callback, CustomField::getLabel() does not exist. What do we do here?
|
||||
$customFieldsLablels = array_map(
|
||||
function ($e) { return $e->getLabel(); },
|
||||
static function ($e) { return $e->getLabel(); },
|
||||
$customFields
|
||||
);
|
||||
|
||||
|
@@ -30,7 +30,7 @@ class ChoicesListType extends AbstractType
|
||||
'required' => false,
|
||||
])
|
||||
->add('slug', HiddenType::class)
|
||||
->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) {
|
||||
->addEventListener(FormEvents::SUBMIT, static function (FormEvent $event) {
|
||||
$form = $event->getForm();
|
||||
$data = $event->getData();
|
||||
|
||||
|
Reference in New Issue
Block a user