aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 11:36:01 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 12:25:29 +0200
commit4094ea47712efbe58624ff74daeb1f77c9b0edcf (patch)
tree3d2c168092d0208e6ba888de969252a54bf0c6c1 /src/Wallabag/CoreBundle/Form/Type/ConfigType.php
parent7eccbda99f16dc39ee01a0c81ab88293e9b268fd (diff)
downloadwallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.tar.gz
wallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.tar.zst
wallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.zip
Convert array + phpDoc
Thanks for https://github.com/thomasbachem/php-short-array-syntax-converter
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/ConfigType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ConfigType.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
index b30b4706..4cf22200 100644
--- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
+++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php
@@ -10,8 +10,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
10 10
11class ConfigType extends AbstractType 11class ConfigType extends AbstractType
12{ 12{
13 private $themes = array(); 13 private $themes = [];
14 private $languages = array(); 14 private $languages = [];
15 15
16 /** 16 /**
17 * @param array $themes Themes come from the LiipThemeBundle (liip_theme.themes) 17 * @param array $themes Themes come from the LiipThemeBundle (liip_theme.themes)
@@ -30,39 +30,39 @@ class ConfigType extends AbstractType
30 public function buildForm(FormBuilderInterface $builder, array $options) 30 public function buildForm(FormBuilderInterface $builder, array $options)
31 { 31 {
32 $builder 32 $builder
33 ->add('theme', ChoiceType::class, array( 33 ->add('theme', ChoiceType::class, [
34 'choices' => array_flip($this->themes), 34 'choices' => array_flip($this->themes),
35 'choices_as_values' => true, 35 'choices_as_values' => true,
36 'label' => 'config.form_settings.theme_label', 36 'label' => 'config.form_settings.theme_label',
37 )) 37 ])
38 ->add('items_per_page', null, array( 38 ->add('items_per_page', null, [
39 'label' => 'config.form_settings.items_per_page_label', 39 'label' => 'config.form_settings.items_per_page_label',
40 )) 40 ])
41 ->add('reading_speed', ChoiceType::class, array( 41 ->add('reading_speed', ChoiceType::class, [
42 'label' => 'config.form_settings.reading_speed.label', 42 'label' => 'config.form_settings.reading_speed.label',
43 'choices' => array( 43 'choices' => [
44 'config.form_settings.reading_speed.100_word' => '0.5', 44 'config.form_settings.reading_speed.100_word' => '0.5',
45 'config.form_settings.reading_speed.200_word' => '1', 45 'config.form_settings.reading_speed.200_word' => '1',
46 'config.form_settings.reading_speed.300_word' => '1.5', 46 'config.form_settings.reading_speed.300_word' => '1.5',
47 'config.form_settings.reading_speed.400_word' => '2', 47 'config.form_settings.reading_speed.400_word' => '2',
48 ), 48 ],
49 )) 49 ])
50 ->add('language', ChoiceType::class, array( 50 ->add('language', ChoiceType::class, [
51 'choices' => array_flip($this->languages), 51 'choices' => array_flip($this->languages),
52 'choices_as_values' => true, 52 'choices_as_values' => true,
53 'label' => 'config.form_settings.language_label', 53 'label' => 'config.form_settings.language_label',
54 )) 54 ])
55 ->add('save', SubmitType::class, array( 55 ->add('save', SubmitType::class, [
56 'label' => 'config.form.save', 56 'label' => 'config.form.save',
57 )) 57 ])
58 ; 58 ;
59 } 59 }
60 60
61 public function configureOptions(OptionsResolver $resolver) 61 public function configureOptions(OptionsResolver $resolver)
62 { 62 {
63 $resolver->setDefaults(array( 63 $resolver->setDefaults([
64 'data_class' => 'Wallabag\CoreBundle\Entity\Config', 64 'data_class' => 'Wallabag\CoreBundle\Entity\Config',
65 )); 65 ]);
66 } 66 }
67 67
68 public function getBlockPrefix() 68 public function getBlockPrefix()