Completed
Push — master ( b2b010...6932db )
by Vladimir
02:55
created
src/Form/Type/AutoFormType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
         $resolver->setNormalizer(
46 46
             'data_class',
47
-            function (Options $options, $value) {
47
+            function(Options $options, $value) {
48 48
                 if (empty($value)) {
49 49
                     throw new \RuntimeException(sprintf('Missing "data_class" option of "AutoFormType".'));
50 50
                 }
Please login to merge, or discard this patch.
src/Form/Type/TranslationsFormsType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $resolver->setDefaults([
67 67
             'by_reference' => false,
68
-            'empty_data' => function () {
68
+            'empty_data' => function() {
69 69
                 return new \Doctrine\Common\Collections\ArrayCollection();
70 70
             },
71 71
             'locales' => $this->localeProvider->getLocales(),
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             'form_options' => [],
76 76
         ]);
77 77
 
78
-        $resolver->setNormalizer('form_options', function (Options $options, $value) {
78
+        $resolver->setNormalizer('form_options', function(Options $options, $value) {
79 79
             // Check mandatory data_class option when AutoFormType use
80 80
             if (is_a($options['form_type'], AutoFormType::class, true) && !isset($value['data_class'])) {
81 81
                 throw new \RuntimeException(sprintf('Missing "data_class" option under "form_options" of TranslationsFormsType. Required when "form_type" use "AutoFormType".'));
Please login to merge, or discard this patch.
src/Form/Type/TranslationsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     {
65 65
         $resolver->setDefaults([
66 66
             'by_reference' => false,
67
-            'empty_data' => function () {
67
+            'empty_data' => function() {
68 68
                 return new \Doctrine\Common\Collections\ArrayCollection();
69 69
             },
70 70
             'locales' => $this->localeProvider->getLocales(),
Please login to merge, or discard this patch.
src/Form/Type/TranslatedEntityType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,17 +39,17 @@
 block discarded – undo
39 39
         $resolver->setDefaults([
40 40
             'translation_path' => 'translations',
41 41
             'translation_property' => null,
42
-            'query_builder' => function (EntityRepository $er) {
42
+            'query_builder' => function(EntityRepository $er) {
43 43
                 return $er->createQueryBuilder('e')
44 44
                     ->select('e, t')
45 45
                     ->join('e.translations', 't');
46 46
             },
47
-            'property' => function (Options $options) {
47
+            'property' => function(Options $options) {
48 48
                 if (null === ($request = $this->requestStack->getCurrentRequest())) {
49 49
                     throw new \RuntimeException('Error while getting request');
50 50
                 }
51 51
 
52
-                return $options['translation_path'].'['.$request->getLocale().'].'.$options['translation_property'];
52
+                return $options['translation_path'] . '[' . $request->getLocale() . '].' . $options['translation_property'];
53 53
             },
54 54
         ]);
55 55
     }
Please login to merge, or discard this patch.
src/Form/EventListener/TranslationsListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
             return $translatableClass::getTranslationClass();
87 87
         }
88 88
 
89
-        return $translatableClass.'Translation';
89
+        return $translatableClass . 'Translation';
90 90
     }
91 91
 
92 92
     /**
Please login to merge, or discard this patch.
src/DependencyInjection/I18nFormExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function load(array $configs, ContainerBuilder $container)
20 20
     {
21
-        $loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config'));
21
+        $loader = new XmlFileLoader($container, new FileLocator(dirname(__DIR__) . '/Resources/config'));
22 22
 
23 23
         $configuration = $this->getConfiguration($configs, $container);
24 24
         $config = $this->processConfiguration($configuration, $configs);
Please login to merge, or discard this patch.
src/DependencyInjection/Configuration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
                     ->defaultValue(['en'])
33 33
                     ->beforeNormalization()
34 34
                         ->ifString()
35
-                        ->then(function ($v) {
35
+                        ->then(function($v) {
36 36
                             return preg_split('/\s*[,|]\s*/', $v);
37 37
                         })
38 38
                     ->end()
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                 ->arrayNode('required_locales')
43 43
                     ->beforeNormalization()
44 44
                         ->ifString()
45
-                        ->then(function ($v) {
45
+                        ->then(function($v) {
46 46
                             return preg_split('/\s*[,|]\s*/', $v);
47 47
                         })
48 48
                     ->end()
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                     ->defaultValue(['id', 'locale', 'translatable'])
53 53
                     ->beforeNormalization()
54 54
                         ->ifString()
55
-                        ->then(function ($v) {
55
+                        ->then(function($v) {
56 56
                             return preg_split('/\s*[,|]\s*/', $v);
57 57
                         })
58 58
                     ->end()
Please login to merge, or discard this patch.