File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
reference/forms/types/options Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ better performance::
5757 return ChoiceType::class;
5858 }
5959
60- public function configureOptions(OptionsResolver $resolver)
60+ public function configureOptions(OptionsResolver $resolver): void
6161 {
6262 $resolver->setDefaults([
6363 // the example below will create a CallbackChoiceLoader from the callable
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ of the form.
1313With customized error mapping, you can do better: map the error to the city
1414field so that it displays above it::
1515
16- public function configureOptions(OptionsResolver $resolver)
16+ public function configureOptions (OptionsResolver $resolver): void
1717 {
1818 $resolver->setDefaults ([
1919 ' error_mapping' => [
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ For ``null`` the validator will just use the ``Default`` group.
1111If you specify the groups as an array or string they will be used by the
1212validator as they are::
1313
14- public function configureOptions(OptionsResolver $resolver)
14+ public function configureOptions(OptionsResolver $resolver): void
1515 {
1616 $resolver->setDefaults([
1717 'validation_groups' => 'Registration',
@@ -31,7 +31,7 @@ the option. Symfony will then pass the form when calling it::
3131 use Symfony\Component\OptionsResolver\OptionsResolver;
3232
3333 // ...
34- public function configureOptions(OptionsResolver $resolver)
34+ public function configureOptions(OptionsResolver $resolver): void
3535 {
3636 $resolver->setDefaults([
3737 'validation_groups' => function (FormInterface $form): array {
@@ -69,7 +69,7 @@ Here's an example::
6969 class MyType extends AbstractType
7070 {
7171 // ...
72- public function configureOptions(OptionsResolver $resolver)
72+ public function configureOptions(OptionsResolver $resolver): void
7373 {
7474 $resolver->setDefaults([
7575 'validation_groups' => new GroupSequence(['First', 'Second']),
You can’t perform that action at this time.
0 commit comments