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::