Passed
Push — master ( 12ac14...408b60 )
by David
03:10
created
tests/Form/Type/TranslationsTypeSimpleTest.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,16 +59,16 @@
 block discarded – undo
59 59
 
60 60
         $productTranslationEn = new ProductTranslation();
61 61
         $productTranslationEn->setLocale('en')
62
-                             ->setTitle('title en')
63
-                             ->setDescription('desc en');
62
+                                ->setTitle('title en')
63
+                                ->setDescription('desc en');
64 64
         $productTranslationFr = new ProductTranslation();
65 65
         $productTranslationFr->setLocale('fr')
66
-                             ->setTitle('title fr')
67
-                             ->setDescription('desc fr');
66
+                                ->setTitle('title fr')
67
+                                ->setDescription('desc fr');
68 68
         $productTranslationDe = new ProductTranslation();
69 69
         $productTranslationDe->setLocale('de')
70
-                             ->setTitle('title de')
71
-                             ->setDescription('desc de');
70
+                                ->setTitle('title de')
71
+                                ->setDescription('desc de');
72 72
 
73 73
         $product = new Product();
74 74
         $product->setUrl('a2lix.fr')
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
         $translationsForm = $form->get('translations')->all();
39 39
         $translationsLocales = array_keys($translationsForm);
40
-        $translationsRequiredLocales = array_keys(array_filter($translationsForm, function ($form) {
40
+        $translationsRequiredLocales = array_keys(array_filter($translationsForm, function($form) {
41 41
             return $form->isRequired();
42 42
         }));
43 43
 
Please login to merge, or discard this patch.
tests/Form/Type/TranslationsFormsTypeSimpleTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
         $mediasForm = $form->get('medias')->all();
42 42
         $mediasLocales = array_keys($mediasForm);
43
-        $mediasRequiredLocales = array_keys(array_filter($mediasForm, function ($form) {
43
+        $mediasRequiredLocales = array_keys(array_filter($mediasForm, function($form) {
44 44
             return $form->isRequired();
45 45
         }));
46 46
 
Please login to merge, or discard this patch.
src/DependencyInjection/Configuration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                 ->arrayNode('locales')
38 38
                     ->beforeNormalization()
39 39
                         ->ifString()
40
-                        ->then(function ($v) {
40
+                        ->then(function($v) {
41 41
                             return preg_split('/\s*,\s*/', $v);
42 42
                         })
43 43
                     ->end()
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 ->arrayNode('required_locales')
49 49
                     ->beforeNormalization()
50 50
                         ->ifString()
51
-                        ->then(function ($v) {
51
+                        ->then(function($v) {
52 52
                             return preg_split('/\s*,\s*/', $v);
53 53
                         })
54 54
                     ->end()
Please login to merge, or discard this patch.
src/DependencyInjection/A2lixTranslationFormExtension.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
32 32
         $container->setParameter('a2lix_translation_form.locale_provider', $config['locale_provider']);
33 33
         $container->setParameter('a2lix_translation_form.locales', $config['locales']);
34 34
         $container->setParameter('a2lix_translation_form.required_locales', $config['required_locales']);
35
-        $container->setParameter('a2lix_translation_form.default_locale', $config['default_locale'] ?:
36
-            $container->getParameter('kernel.default_locale'));
35
+        $container->setParameter('a2lix_translation_form.default_locale', $config['default_locale'] ?: $container->getParameter('kernel.default_locale'));
37 36
 
38 37
         $container->setParameter('a2lix_translation_form.templating', $config['templating']);
39 38
     }
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
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     {
51 51
         $resolver->setDefaults([
52 52
             'by_reference' => false,
53
-            'empty_data' => function (FormInterface $form) {
53
+            'empty_data' => function(FormInterface $form) {
54 54
                 return new ArrayCollection();
55 55
             },
56 56
             'locales' => $this->localeProvider->getLocales(),
Please login to merge, or discard this patch.
src/Form/Type/TranslatedEntityType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@
 block discarded – undo
34 34
     {
35 35
         $resolver->setDefaults([
36 36
             'translation_path' => 'translations',
37
-            'query_builder' => function (EntityRepository $er) {
37
+            'query_builder' => function(EntityRepository $er) {
38 38
                 return $er->createQueryBuilder('e')
39 39
                     ->select('e, t')
40 40
                     ->join('e.translations', 't');
41 41
             },
42
-            'choice_label' => function (Options $options) {
42
+            'choice_label' => function(Options $options) {
43 43
                 if (null === ($request = $this->requestStack->getCurrentRequest())) {
44 44
                     throw new \RuntimeException('Error while getting request');
45 45
                 }
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
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $resolver->setDefaults([
54 54
             'by_reference' => false,
55
-            'empty_data' => function (FormInterface $form) {
55
+            'empty_data' => function(FormInterface $form) {
56 56
                 return new ArrayCollection();
57 57
             },
58 58
             'locales' => $this->localeProvider->getLocales(),
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
         $resolver->setRequired('form_type');
65 65
 
66
-        $resolver->setNormalizer('form_options', function (Options $options, $value): array {
66
+        $resolver->setNormalizer('form_options', function(Options $options, $value): array {
67 67
             // Check mandatory data_class option when AutoFormType use
68 68
             if (($options['form_type'] instanceof AutoFormType) && !isset($value['data_class'])) {
69 69
                 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.
tests/Form/Type/TranslationsTypeAdvancedTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 
38 38
         $translationsForm = $form->get('translations')->all();
39 39
         $translationsLocales = array_keys($translationsForm);
40
-        $translationsRequiredLocales = array_keys(array_filter($translationsForm, function ($form) {
40
+        $translationsRequiredLocales = array_keys(array_filter($translationsForm, function($form) {
41 41
             return $form->isRequired();
42 42
         }));
43 43
 
Please login to merge, or discard this patch.
tests/Form/Type/TranslationsFormsTypeAdvancedTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
         $mediasForm = $form->get('medias')->all();
42 42
         $mediasLocales = array_keys($mediasForm);
43
-        $mediasRequiredLocales = array_keys(array_filter($mediasForm, function ($form) {
43
+        $mediasRequiredLocales = array_keys(array_filter($mediasForm, function($form) {
44 44
             return $form->isRequired();
45 45
         }));
46 46
 
Please login to merge, or discard this patch.