Skip to content

Commit 9fcdd32

Browse files
committed
minor #18059 Update create_custom_field_type.rst (hbgamra)
This PR was submitted for the 6.3 branch but it was merged into the 6.2 branch instead. Discussion ---------- Update create_custom_field_type.rst Adding return type for setNormalizer callback function <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- d887b5a Update create_custom_field_type.rst
2 parents 656c2c1 + d887b5a commit 9fcdd32

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

form/create_custom_field_type.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ to define, validate and process their values::
271271

272272
// optionally you can transform the given values for the options to
273273
// simplify the further processing of those options
274-
$resolver->setNormalizer('allowed_states', static function (Options $options, $states) {
274+
$resolver->setNormalizer('allowed_states', static function (Options $options, $states): ?array
275+
{
275276
if (null === $states) {
276277
return $states;
277278
}

0 commit comments

Comments
 (0)