]> Raphaël G. Git Repositories - airbundle/blobdiff - Form/ContactType.php
Rename rapsysair:calendar2 command to rapsysair:calendar
[airbundle] / Form / ContactType.php
index 8e5946e8138ef99de557c13f66894df33466b860..4142c996d4c0bc3dcdcf8a3d13b8c7ffba8f8a7a 100644 (file)
@@ -1,4 +1,13 @@
-<?php
+<?php declare(strict_types=1);
+
+/*
+ * This file is part of the Rapsys AirBundle package.
+ *
+ * (c) Raphaël Gertz <symfony@rapsys.eu>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
 
 namespace Rapsys\AirBundle\Form;
 
@@ -13,11 +22,14 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
 use Symfony\Component\Validator\Constraints\Email;
 use Symfony\Component\Validator\Constraints\NotBlank;
 
+/**
+ * {@inheritdoc}
+ */
 class ContactType extends CaptchaType {
        /**
         * {@inheritdoc}
         */
-       public function buildForm(FormBuilderInterface $builder, array $options) {
+       public function buildForm(FormBuilderInterface $builder, array $options): void {
                //Add fields
                $builder
                        ->add('name', TextType::class, ['attr' => ['placeholder' => 'Your name'], 'constraints' => [new NotBlank(['message' => 'Please provide your name'])]])
@@ -33,7 +45,10 @@ class ContactType extends CaptchaType {
        /**
         * {@inheritdoc}
         */
-       public function configureOptions(OptionsResolver $resolver) {
+       public function configureOptions(OptionsResolver $resolver): void {
+               //Call parent configure options
+               parent::configureOptions($resolver);
+
                //Set defaults
                $resolver->setDefaults(['error_bubbling' => true]);
        }
@@ -41,7 +56,7 @@ class ContactType extends CaptchaType {
        /**
         * {@inheritdoc}
         */
-       public function getName() {
+       public function getName(): string {
                return 'contact_form';
        }
 }