X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/dd464dfb12c31a66808e912c87e4573d41c7eb31..dbe6f6710034af730e633e1c810ad7f020fe9551:/Form/LocationType.php diff --git a/Form/LocationType.php b/Form/LocationType.php index ad4b945..0072d8b 100644 --- a/Form/LocationType.php +++ b/Form/LocationType.php @@ -30,8 +30,9 @@ class LocationType extends AbstractType { /** * {@inheritdoc} */ - public function buildForm(FormBuilderInterface $builder, array $options) { - return $builder + public function buildForm(FormBuilderInterface $builder, array $options): void { + //Build form + $builder ->add('title', TextType::class, ['attr' => ['placeholder' => 'Your title'], 'constraints' => [new NotBlank(['message' => 'Please provide your title'])]]) ->add('description', TextareaType::class, ['attr' => ['placeholder' => 'Your description', 'cols' => 50, 'rows' => 15], 'required' => false]) ->add('address', TextType::class, ['attr' => ['placeholder' => 'Your address'], 'constraints' => [new NotBlank(['message' => 'Please provide your address'])]]) @@ -47,7 +48,7 @@ class LocationType extends AbstractType { /** * {@inheritdoc} */ - public function configureOptions(OptionsResolver $resolver) { + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults(['data_class' => Location::class, 'error_bubbling' => true]); } }