Skip to content

Commit aeb8d66

Browse files
authored
Fix bug return type of closure
1 parent 8497373 commit aeb8d66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

form/use_empty_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The closure must accept a ``FormInterface`` instance as the first argument::
9494
public function configureOptions(OptionsResolver $resolver): void
9595
{
9696
$resolver->setDefaults([
97-
'empty_data' => function (FormInterface $form) {
97+
'empty_data' => function (FormInterface $form): Blog {
9898
return new Blog($form->get('title')->getData());
9999
},
100100
]);

0 commit comments

Comments
 (0)