From 17c9cf975bab65b7b197a9b3516a7ac4ba53690d Mon Sep 17 00:00:00 2001 From: "Andrew (Andrius) Marcinkevicius" Date: Sat, 31 Jan 2015 10:51:23 +0200 Subject: [PATCH] Remove horizontal scrollbar | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.6 | Fixed tickets | --- components/options_resolver.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/options_resolver.rst b/components/options_resolver.rst index e8c1f8632e2..7320962fdba 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -134,8 +134,8 @@ is thrown if an unknown option is passed:: 'usernme' => 'johndoe', )); - // UndefinedOptionsException: The option "usernme" does not exist. Known - // options are: "host", "password", "port", "username" + // UndefinedOptionsException: The option "usernme" does not exist. + // Known options are: "host", "password", "port", "username" The rest of your code can access the values of the options without boilerplate code:: @@ -354,8 +354,8 @@ is thrown:: 'host' => 25, )); - // InvalidOptionsException: The option "host" with value "25" is expected to - // be of type "string" + // InvalidOptionsException: The option "host" with value "25" is + // expected to be of type "string" In sub-classes, you can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addAllowedTypes` to add additional allowed types without erasing the ones already set. @@ -395,8 +395,8 @@ is thrown:: 'transport' => 'send-mail', )); - // InvalidOptionsException: The option "transport" has the value "send-mail", - // but is expected to be one of "sendmail", "mail", "smtp" + // InvalidOptionsException: The option "transport" has the value + // "send-mail", but is expected to be one of "sendmail", "mail", "smtp" For options with more complicated validation schemes, pass a closure which returns ``true`` for acceptable values and ``false`` for invalid values::