diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-04-12 11:36:01 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-04-12 12:25:29 +0200 |
commit | 4094ea47712efbe58624ff74daeb1f77c9b0edcf (patch) | |
tree | 3d2c168092d0208e6ba888de969252a54bf0c6c1 /src/Wallabag/CoreBundle/Form/Type/NewUserType.php | |
parent | 7eccbda99f16dc39ee01a0c81ab88293e9b268fd (diff) | |
download | wallabag-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/NewUserType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 60fcc20c..6a6f63d1 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php | |||
@@ -17,38 +17,38 @@ class NewUserType extends AbstractType | |||
17 | public function buildForm(FormBuilderInterface $builder, array $options) | 17 | public function buildForm(FormBuilderInterface $builder, array $options) |
18 | { | 18 | { |
19 | $builder | 19 | $builder |
20 | ->add('username', TextType::class, array( | 20 | ->add('username', TextType::class, [ |
21 | 'required' => true, | 21 | 'required' => true, |
22 | 'label' => 'config.form_new_user.username_label', | 22 | 'label' => 'config.form_new_user.username_label', |
23 | )) | 23 | ]) |
24 | ->add('plainPassword', RepeatedType::class, array( | 24 | ->add('plainPassword', RepeatedType::class, [ |
25 | 'type' => PasswordType::class, | 25 | 'type' => PasswordType::class, |
26 | 'invalid_message' => 'validator.password_must_match', | 26 | 'invalid_message' => 'validator.password_must_match', |
27 | 'first_options' => array('label' => 'config.form_new_user.password_label'), | 27 | 'first_options' => ['label' => 'config.form_new_user.password_label'], |
28 | 'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'), | 28 | 'second_options' => ['label' => 'config.form_new_user.repeat_new_password_label'], |
29 | 'constraints' => array( | 29 | 'constraints' => [ |
30 | new Constraints\Length(array( | 30 | new Constraints\Length([ |
31 | 'min' => 8, | 31 | 'min' => 8, |
32 | 'minMessage' => 'validator.password_too_short', | 32 | 'minMessage' => 'validator.password_too_short', |
33 | )), | 33 | ]), |
34 | new Constraints\NotBlank(), | 34 | new Constraints\NotBlank(), |
35 | ), | 35 | ], |
36 | 'label' => 'config.form_new_user.plain_password_label', | 36 | 'label' => 'config.form_new_user.plain_password_label', |
37 | )) | 37 | ]) |
38 | ->add('email', EmailType::class, array( | 38 | ->add('email', EmailType::class, [ |
39 | 'label' => 'config.form_new_user.email_label', | 39 | 'label' => 'config.form_new_user.email_label', |
40 | )) | 40 | ]) |
41 | ->add('save', SubmitType::class, array( | 41 | ->add('save', SubmitType::class, [ |
42 | 'label' => 'config.form.save', | 42 | 'label' => 'config.form.save', |
43 | )) | 43 | ]) |
44 | ; | 44 | ; |
45 | } | 45 | } |
46 | 46 | ||
47 | public function configureOptions(OptionsResolver $resolver) | 47 | public function configureOptions(OptionsResolver $resolver) |
48 | { | 48 | { |
49 | $resolver->setDefaults(array( | 49 | $resolver->setDefaults([ |
50 | 'data_class' => 'Wallabag\UserBundle\Entity\User', | 50 | 'data_class' => 'Wallabag\UserBundle\Entity\User', |
51 | )); | 51 | ]); |
52 | } | 52 | } |
53 | 53 | ||
54 | public function getBlockPrefix() | 54 | public function getBlockPrefix() |