From c1aa42b3cf2c7475eff81d7e6f26451d1ccad114 Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Mon, 11 Nov 2024 07:01:13 -0500 Subject: [PATCH] set empty_data to integers Purely style, but to me it looks funny to set an IntegerType to a string, though of course it works as documented. --- form/data_mappers.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/form/data_mappers.rst b/form/data_mappers.rst index cb5c7936701..78b69ce2bcc 100644 --- a/form/data_mappers.rst +++ b/form/data_mappers.rst @@ -155,13 +155,13 @@ method:: ->add('red', IntegerType::class, [ // enforce the strictness of the type to ensure the constructor // of the Color class doesn't break - 'empty_data' => '0', + 'empty_data' => 0, ]) ->add('green', IntegerType::class, [ - 'empty_data' => '0', + 'empty_data' => 0, ]) ->add('blue', IntegerType::class, [ - 'empty_data' => '0', + 'empty_data' => 0, ]) // configure the data mapper for this FormType ->setDataMapper($this)