Passed
Push — master ( 9b369b...9fe481 )
by Dāvis
04:59
created
Translatable/Form/Type/TranslatorType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     private function addPreSetDataListener(FormBuilderInterface $builder, $fieldName, $translations, $fieldType, $class, $required, $className, $id)
86 86
     {
87 87
         // 'populate' fields by *hook on form generation
88
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($fieldName, $translations, $fieldType, $class, $required, $className, $id) {
88
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($fieldName, $translations, $fieldType, $class, $required, $className, $id) {
89 89
             $form = $event->getForm();
90 90
             foreach ($this->locales as $locale) {
91 91
                 $data = (array_key_exists($locale, $translations) && array_key_exists($fieldName, $translations[$locale])) ? $translations[$locale][$fieldName] : null;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
     private function addPostSubmitListener(FormBuilderInterface $builder, $fieldName, $className, $id)
111 111
     {
112
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($fieldName, $className, $id) {
112
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($fieldName, $className, $id) {
113 113
             $form = $event->getForm();
114 114
             $this->manager->persistTranslations($form, $className, $fieldName, $id, $this->locales);
115 115
         });
Please login to merge, or discard this patch.