@@ -24,7 +24,7 @@ |
||
24 | 24 | ->children() |
25 | 25 | ->scalarNode('class') |
26 | 26 | ->validate() |
27 | - ->ifTrue(function ($class) { |
|
27 | + ->ifTrue(function($class) { |
|
28 | 28 | return !class_exists($class); |
29 | 29 | }) |
30 | 30 | ->thenInvalid("Class doesn't exist.") |
@@ -21,10 +21,10 @@ |
||
21 | 21 | public function buildForm(FormBuilderInterface $builder, array $options) { |
22 | 22 | parent::buildForm($builder, $options); |
23 | 23 | $builder->addModelTransformer(new CallbackTransformer( |
24 | - function ($id) use ($options) { |
|
24 | + function($id) use ($options) { |
|
25 | 25 | return $id === null ? null : $this->doctrine->getRepository($options['class'])->find($id); |
26 | 26 | }, |
27 | - function ($entity) use ($options) { |
|
27 | + function($entity) use ($options) { |
|
28 | 28 | return $entity === null ? |
29 | 29 | null : $this->doctrine->getEntityManagerForClass($options['class'])->getUnitOfWork()->getSingleIdentifierValue($entity); |
30 | 30 | } |
@@ -48,13 +48,13 @@ |
||
48 | 48 | */ |
49 | 49 | public function assignAction(Request $request) { |
50 | 50 | $configurationValues = $this->entityManager->getRepository(ConfigurationValue::class)->findAll(); |
51 | - $existingValueKeys = array_map(function (ConfigurationValue $value) { |
|
51 | + $existingValueKeys = array_map(function(ConfigurationValue $value) { |
|
52 | 52 | return $value->getKey(); |
53 | 53 | }, $configurationValues); |
54 | 54 | $missingValueKeys = array_diff($this->registry->keys(), $existingValueKeys); |
55 | 55 | $configurationValues = array_merge( |
56 | 56 | $configurationValues, |
57 | - array_map(function (string $key) { |
|
57 | + array_map(function(string $key) { |
|
58 | 58 | $value = new ConfigurationValue(); |
59 | 59 | $value->setKey($key); |
60 | 60 | return $value; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public function buildForm(FormBuilderInterface $builder, array $options) { |
35 | 35 | $builder |
36 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
36 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
37 | 37 | /* @var $configurationValue ConfigurationValue */ |
38 | 38 | $configurationValue = $event->getData(); |
39 | 39 | $definition = $this->registry->get($configurationValue->getKey()); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $form->add('value', EntityConfigurationValueType::class, [ |
45 | 45 | 'class' => $definition->getClass(), |
46 | 46 | 'choice_label' => $definition->getChoiceLabel(), |
47 | - 'label' => $this->translationPrefix . $configurationValue->getKey(), |
|
47 | + 'label' => $this->translationPrefix.$configurationValue->getKey(), |
|
48 | 48 | 'translation_domain' => $this->translationDomain, |
49 | 49 | 'placeholder' => 'Please choose', |
50 | 50 | 'empty_data' => null, |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | break; |
54 | 54 | default: // assume StringDefinition |
55 | 55 | $event->getForm()->add('value', TextType::class, [ |
56 | - 'label' => $this->translationPrefix . $configurationValue->getKey(), |
|
56 | + 'label' => $this->translationPrefix.$configurationValue->getKey(), |
|
57 | 57 | 'translation_domain' => $this->translationDomain, |
58 | 58 | 'required' => false |
59 | 59 | ]); |