diff --git a/reference/forms/types/options/choice_filter.rst.inc b/reference/forms/types/options/choice_filter.rst.inc index 235e1d84ed9..476290f9f69 100644 --- a/reference/forms/types/options/choice_filter.rst.inc +++ b/reference/forms/types/options/choice_filter.rst.inc @@ -18,7 +18,7 @@ define a callable that takes each choice as the only argument and must return class AddressType extends AbstractType { - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver ->setDefaults([ diff --git a/reference/forms/types/options/choice_loader.rst.inc b/reference/forms/types/options/choice_loader.rst.inc index 502ddb125c7..553c9694b14 100644 --- a/reference/forms/types/options/choice_loader.rst.inc +++ b/reference/forms/types/options/choice_loader.rst.inc @@ -57,7 +57,7 @@ better performance:: return ChoiceType::class; } - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ // the example below will create a CallbackChoiceLoader from the callable diff --git a/reference/forms/types/options/error_mapping.rst.inc b/reference/forms/types/options/error_mapping.rst.inc index 37b3b204483..4c70276d741 100644 --- a/reference/forms/types/options/error_mapping.rst.inc +++ b/reference/forms/types/options/error_mapping.rst.inc @@ -13,7 +13,7 @@ of the form. With customized error mapping, you can do better: map the error to the city field so that it displays above it:: - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'error_mapping' => [ diff --git a/reference/forms/types/options/validation_groups.rst.inc b/reference/forms/types/options/validation_groups.rst.inc index c5fe70b6d67..1f5c9a597a3 100644 --- a/reference/forms/types/options/validation_groups.rst.inc +++ b/reference/forms/types/options/validation_groups.rst.inc @@ -11,7 +11,7 @@ For ``null`` the validator will just use the ``Default`` group. If you specify the groups as an array or string they will be used by the validator as they are:: - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'validation_groups' => 'Registration', @@ -31,7 +31,7 @@ the option. Symfony will then pass the form when calling it:: use Symfony\Component\OptionsResolver\OptionsResolver; // ... - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'validation_groups' => function (FormInterface $form): array { @@ -69,7 +69,7 @@ Here's an example:: class MyType extends AbstractType { // ... - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'validation_groups' => new GroupSequence(['First', 'Second']),