diff --git a/Form/Type/ScopePickerType.php b/Form/Type/ScopePickerType.php index 1b9f1a68c..379bb2183 100644 --- a/Form/Type/ScopePickerType.php +++ b/Form/Type/ScopePickerType.php @@ -87,8 +87,7 @@ class ScopePickerType extends AbstractType $items = $query->getQuery()->execute(); if (1 !== count($items)) { - $builder->add( - 'scope', EntityType::class, [ + $builder->add('scope', EntityType::class, [ 'class' => Scope::class, 'placeholder' => 'Choose the circle', 'choice_label' => function (Scope $c) { @@ -97,15 +96,12 @@ class ScopePickerType extends AbstractType 'query_builder' => function () use ($options) { return $this->buildAccessibleScopeQuery($options['center'], $options['role']); }, - ] - ); + ]); $builder->setDataMapper(new ScopePickerDataMapper()); } else { - $builder->add( - 'scope', HiddenType::class, [ + $builder->add('scope', HiddenType::class, [ 'data' => $items[0]->getId(), - ] - ); + ]); $builder->setDataMapper(new ScopePickerDataMapper($items[0])); } } @@ -114,7 +110,7 @@ class ScopePickerType extends AbstractType { $view->vars = array_replace( $view->vars, [ - 'hideLabel' => true, + 'hideLabel' => true, ] ); }