X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/6bdbe1c589d50c191e02149bdc078ce1a6b1ee38..6f3158f30f33264488887f5a0c8e271cb7d17747:/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]); } }