From: Raphaƫl Gertz Date: Wed, 11 Dec 2019 03:58:26 +0000 (+0100) Subject: Cleanup X-Git-Tag: 0.1.1~52 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/d28756c891aa9a4e7129cdac296258e49e9f8cbe Cleanup Php7 array --- diff --git a/Form/ContactType.php b/Form/ContactType.php index e9a5ba1..24d4d3e 100644 --- a/Form/ContactType.php +++ b/Form/ContactType.php @@ -17,11 +17,12 @@ class ContactType extends AbstractType { * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { - return $builder->add('name', TextType::class, array('attr' => array('placeholder' => 'Your name'), 'constraints' => array(new NotBlank(array('message' => 'Please provide your name'))))) - ->add('subject', TextType::class, array('attr' => array('placeholder' => 'Subject'), 'constraints' => array(new NotBlank(array('message' => 'Please provide your subject'))))) - ->add('mail', EmailType::class, array('attr' => array('placeholder' => 'Your mail address'), 'constraints' => array(new NotBlank(array('message' => 'Please provide a valid mail')), new Email(array('message' => 'Your mail doesn\'t seems to be valid'))))) - ->add('message', TextareaType::class, array('attr' => array('placeholder' => 'Your message here', 'cols' => 50, 'rows' => 15), 'constraints' => array(new NotBlank(array('message' => 'Please provide your message'))))) - ->add('submit', SubmitType::class, array('label' => 'Send', 'attr' => array('class' => 'submit'))); + return $builder + ->add('name', TextType::class, ['attr' => ['placeholder' => 'Your name'], 'constraints' => [new NotBlank(['message' => 'Please provide your name'])]]) + ->add('subject', TextType::class, ['attr' => ['placeholder' => 'Subject'], 'constraints' => [new NotBlank(['message' => 'Please provide your subject'])]]) + ->add('mail', EmailType::class, ['attr' => ['placeholder' => 'Your mail'], 'constraints' => [new NotBlank(['message' => 'Please provide a valid mail']), new Email(['message' => 'Your mail doesn\'t seems to be valid'])]]) + ->add('message', TextareaType::class, ['attr' => ['placeholder' => 'Your message', 'cols' => 50, 'rows' => 15], 'constraints' => [new NotBlank(['message' => 'Please provide your message'])]]) + ->add('submit', SubmitType::class, ['label' => 'Send', 'attr' => ['class' => 'submit']]); } /**