@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | ->arrayNode('locales') |
| 36 | 36 | ->beforeNormalization() |
| 37 | 37 | ->ifString() |
| 38 | - ->then(function ($v) { return preg_split('/\s*,\s*/', $v); }) |
|
| 38 | + ->then(function($v) { return preg_split('/\s*,\s*/', $v); }) |
|
| 39 | 39 | ->end() |
| 40 | 40 | ->requiresAtLeastOneElement() |
| 41 | 41 | ->prototype('scalar')->end() |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ->arrayNode('required_locales') |
| 44 | 44 | ->beforeNormalization() |
| 45 | 45 | ->ifString() |
| 46 | - ->then(function ($v) { return preg_split('/\s*,\s*/', $v); }) |
|
| 46 | + ->then(function($v) { return preg_split('/\s*,\s*/', $v); }) |
|
| 47 | 47 | ->end() |
| 48 | 48 | ->prototype('scalar')->end() |
| 49 | 49 | ->end() |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | $container->setParameter('a2lix_translation_form.locale_provider', $config['locale_provider']); |
| 41 | 41 | $container->setParameter('a2lix_translation_form.locales', $config['locales']); |
| 42 | 42 | $container->setParameter('a2lix_translation_form.required_locales', $config['required_locales']); |
| 43 | - $container->setParameter('a2lix_translation_form.default_locale', $config['default_locale'] ?: |
|
| 44 | - $container->getParameter('kernel.default_locale')); |
|
| 43 | + $container->setParameter('a2lix_translation_form.default_locale', $config['default_locale'] ?: $container->getParameter('kernel.default_locale')); |
|
| 45 | 44 | |
| 46 | 45 | $container->setParameter('a2lix_translation_form.templating', $config['templating']); |
| 47 | 46 | |
@@ -54,12 +54,12 @@ discard block |
||
| 54 | 54 | $resolver->setDefaults([ |
| 55 | 55 | 'translation_path' => 'translations', |
| 56 | 56 | 'translation_property' => null, |
| 57 | - 'query_builder' => function (EntityRepository $er) { |
|
| 57 | + 'query_builder' => function(EntityRepository $er) { |
|
| 58 | 58 | return $er->createQueryBuilder('e') |
| 59 | 59 | ->select('e, t') |
| 60 | 60 | ->join('e.translations', 't'); |
| 61 | 61 | }, |
| 62 | - $optionProperty => function (Options $options) { |
|
| 62 | + $optionProperty => function(Options $options) { |
|
| 63 | 63 | return $options['translation_path'].'['.$this->getLocale().'].'.$options['translation_property']; |
| 64 | 64 | }, |
| 65 | 65 | ]); |
@@ -75,8 +75,7 @@ discard block |
||
| 75 | 75 | { |
| 76 | 76 | return |
| 77 | 77 | method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix') ? |
| 78 | - 'Symfony\Bridge\Doctrine\Form\Type\EntityType' : |
|
| 79 | - 'entity'; |
|
| 78 | + 'Symfony\Bridge\Doctrine\Form\Type\EntityType' : 'entity'; |
|
| 80 | 79 | } |
| 81 | 80 | |
| 82 | 81 | // BC for SF < 3.0 |
@@ -69,8 +69,7 @@ |
||
| 69 | 69 | { |
| 70 | 70 | return |
| 71 | 71 | method_exists('Symfony\Component\Form\AbstractType', 'getBlockPrefix') ? |
| 72 | - 'Symfony\Component\Form\Extension\Core\Type\ChoiceType' : |
|
| 73 | - 'choice'; |
|
| 72 | + 'Symfony\Component\Form\Extension\Core\Type\ChoiceType' : 'choice'; |
|
| 74 | 73 | } |
| 75 | 74 | |
| 76 | 75 | // BC for SF < 3.0 |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | { |
| 69 | 69 | $resolver->setDefaults([ |
| 70 | 70 | 'by_reference' => false, |
| 71 | - 'empty_data' => function (FormInterface $form) { |
|
| 71 | + 'empty_data' => function(FormInterface $form) { |
|
| 72 | 72 | return new \Doctrine\Common\Collections\ArrayCollection(); |
| 73 | 73 | }, |
| 74 | 74 | 'locales' => $this->localeProvider->getLocales(), |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | { |
| 84 | 84 | $resolver->setDefaults([ |
| 85 | 85 | 'by_reference' => false, |
| 86 | - 'empty_data' => function (FormInterface $form) { |
|
| 86 | + 'empty_data' => function(FormInterface $form) { |
|
| 87 | 87 | return new \Doctrine\Common\Collections\ArrayCollection(); |
| 88 | 88 | }, |
| 89 | 89 | 'locales' => $this->localeProvider->getLocales(), |