8000 Removing some // ... :) · symfony/symfony-docs@51275aa · GitHub
[go: up one dir, main page]

Skip to content

Commit 51275aa

Browse files
committed
Removing some // ... :)
1 parent a543894 commit 51275aa

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

components/options_resolver.rst

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -646,13 +646,12 @@ a closure as the default value of the ``spool`` option with a :class:`Symfony\\C
646646
argument. Based on this instance, you can define the options under ``spool`` and its desired default
647647
value::
648648

649-
// ...
650649
class Mailer
651650
{
652651
// ...
652+
653653
public function configureOptions(OptionsResolver $resolver)
654654
{
655-
// ...
656655
$resolver->setDefault('spool', function (OptionsResolver $spoolResolver) {
657656
$spoolResolver->setDefaults(array(
658657
'type' => 'file',
@@ -683,20 +682,18 @@ normalization and more.
683682
If the default value of a child option depend on another option defined in parent level,
684683
adds a second ``Options`` argument to the closure::
685684

686-
// ...
687685
class Mailer
688686
{
689687
// ...
688+
690689
public function configureOptions(OptionsResolver $resolver)
691690
{
692-
// ...
693691
$resolver->setDefault('sandbox', false);
694692
$resolver->setDefault('spool', function (OptionsResolver $spoolResolver, Options $parent) {
695693
$spoolResolver->setDefaults(array(
696694
'type' => $parent['sandbox'] ? 'memory' : 'file',
697695
// ...
698696
));
699-
// ...
700697
});
701698
}
702699
}
@@ -708,10 +705,10 @@ adds a second ``Options`` argument to the closure::
708705

709706
In same way, parent options can access the child option as follows::
710707

711-
// ...
712708
class Mailer
713709
{
714710
// ...
711+
715712
public function configureOptions(OptionsResolver $resolver)
716713
{
717714
// ...
@@ -720,7 +717,6 @@ In same way, parent options can access the child option as follows::
720717
'type' => 'file',
721718
// ...
722719
));
723-
// ...
724720
});
725721
$resolver->setDefault('profiling', function (Options $options) {
726722
return 'file' === $options['spool']['type'];

0 commit comments

Comments
 (0)
0