Skip to content

Commit 018175d

Browse files
committed
minor #6566 Update options_resolver.rst (snake77se)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #6566). Discussion ---------- Update options_resolver.rst Commits ------- 0bc1cc7 Update options_resolver.rst
2 parents 788950a + 0bc1cc7 commit 018175d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

components/options_resolver.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,12 +403,11 @@ is thrown::
403403
For options with more complicated validation schemes, pass a closure which
404404
returns ``true`` for acceptable values and ``false`` for invalid values::
405405

406-
$resolver->setAllowedValues(array(
407-
// ...
408-
$resolver->setAllowedValues('transport', function ($value) {
409-
// return true or false
410-
});
411-
));
406+
407+
// ...
408+
$resolver->setAllowedValues('transport', function ($value) {
409+
// return true or false
410+
});
412411

413412
In sub-classes, you can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addAllowedValues`
414413
to add additional allowed values without erasing the ones already set.

0 commit comments

Comments
 (0)