]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Form/Type/ConfigType.php
Convert array + phpDoc
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / ConfigType.php
index b30b4706af4a750ae7548f413a5a4988b0392661..4cf22200fa753ba06ab113505fe5fa7e77a59d51 100644 (file)
@@ -10,8 +10,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
 
 class ConfigType extends AbstractType
 {
-    private $themes = array();
-    private $languages = array();
+    private $themes = [];
+    private $languages = [];
 
     /**
      * @param array $themes    Themes come from the LiipThemeBundle (liip_theme.themes)
@@ -30,39 +30,39 @@ class ConfigType extends AbstractType
     public function buildForm(FormBuilderInterface $builder, array $options)
     {
         $builder
-            ->add('theme', ChoiceType::class, array(
+            ->add('theme', ChoiceType::class, [
                 'choices' => array_flip($this->themes),
                 'choices_as_values' => true,
                 'label' => 'config.form_settings.theme_label',
-            ))
-            ->add('items_per_page', null, array(
+            ])
+            ->add('items_per_page', null, [
                 'label' => 'config.form_settings.items_per_page_label',
-            ))
-            ->add('reading_speed', ChoiceType::class, array(
+            ])
+            ->add('reading_speed', ChoiceType::class, [
                 'label' => 'config.form_settings.reading_speed.label',
-                'choices' => array(
+                'choices' => [
                     'config.form_settings.reading_speed.100_word' => '0.5',
                     'config.form_settings.reading_speed.200_word' => '1',
                     'config.form_settings.reading_speed.300_word' => '1.5',
                     'config.form_settings.reading_speed.400_word' => '2',
-                ),
-            ))
-            ->add('language', ChoiceType::class, array(
+                ],
+            ])
+            ->add('language', ChoiceType::class, [
                 'choices' => array_flip($this->languages),
                 'choices_as_values' => true,
                 'label' => 'config.form_settings.language_label',
-            ))
-            ->add('save', SubmitType::class, array(
+            ])
+            ->add('save', SubmitType::class, [
                 'label' => 'config.form.save',
-            ))
+            ])
         ;
     }
 
     public function configureOptions(OptionsResolver $resolver)
     {
-        $resolver->setDefaults(array(
+        $resolver->setDefaults([
             'data_class' => 'Wallabag\CoreBundle\Entity\Config',
-        ));
+        ]);
     }
 
     public function getBlockPrefix()