Passed
Branch 2.x (bfdc23)
by David
07:42
created
DependencyInjection/Configuration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.
DependencyInjection/A2lixTranslationFormExtension.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Form/Type/TranslatedEntityType.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
Form/Type/TranslationsLocalesSelectorType.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Form/Type/TranslationsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
Form/Type/TranslationsFormsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
Tests/Gedmo/Form/TranslationsTypeTest.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -49,16 +49,16 @@  discard block
 block discarded – undo
49 49
 
50 50
         $productTranslationFr = new ProductTranslation();
51 51
         $productTranslationFr->setLocale('fr')
52
-                             ->setTitle('title fr')
53
-                             ->setDescription('desc fr');
52
+                                ->setTitle('title fr')
53
+                                ->setDescription('desc fr');
54 54
         $productTranslationEn = new ProductTranslation();
55 55
         $productTranslationEn->setLocale('en')
56
-                             ->setTitle('title en')
57
-                             ->setDescription('desc en');
56
+                                ->setTitle('title en')
57
+                                ->setDescription('desc en');
58 58
         $productTranslationDe = new ProductTranslation();
59 59
         $productTranslationDe->setLocale('de')
60
-                             ->setTitle('title de')
61
-                             ->setDescription('desc de');
60
+                                ->setTitle('title de')
61
+                                ->setDescription('desc de');
62 62
 
63 63
         $product = new Product();
64 64
         $product->setUrl('a2lix.fr')
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 
142 142
         $productTranslationEs = new ProductTranslation();
143 143
         $productTranslationEs->setLocale('es')
144
-                             ->setTitle('title es')
145
-                             ->setDescription('desc es');
144
+                                ->setTitle('title es')
145
+                                ->setDescription('desc es');
146 146
         $productTranslationFr = new ProductTranslation();
147 147
         $productTranslationFr->setLocale('fr')
148
-                             ->setTitle('title fr')
149
-                             ->setDescription('desc fr');
148
+                                ->setTitle('title fr')
149
+                                ->setDescription('desc fr');
150 150
 
151 151
         $product = new Product();
152 152
         $product->setUrl('a2lix.fr')
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
         ];
191 191
         $productTranslationDe = new ProductTranslation();
192 192
         $productTranslationDe->setLocale('de')
193
-                             ->setTitle('title de')
194
-                             ->setDescription('desc de');
193
+                                ->setTitle('title de')
194
+                                ->setDescription('desc de');
195 195
         $product->addTranslation($productTranslationDe);
196 196
 
197 197
         $form = $this->factory->createBuilder($formType, $product)
@@ -236,13 +236,13 @@  discard block
 block discarded – undo
236 236
 
237 237
         $productTranslationFr = new ProductTranslation();
238 238
         $productTranslationFr->setLocale('fr')
239
-                             ->setTitle('title fr');
239
+                                ->setTitle('title fr');
240 240
         $productTranslationEn = new ProductTranslation();
241 241
         $productTranslationEn->setLocale('en')
242
-                             ->setTitle('title en');
242
+                                ->setTitle('title en');
243 243
         $productTranslationDe = new ProductTranslation();
244 244
         $productTranslationDe->setLocale('de')
245
-                             ->setTitle('title de');
245
+                                ->setTitle('title de');
246 246
 
247 247
         $product = new Product();
248 248
         $product->setUrl('a2lix.fr')
Please login to merge, or discard this patch.