[OptionsResolver] Allow giving a callback as an allowedValue to OptionsResolver

by @marekkalnik

Some issues have been detected in this pull request

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/8375/8d05642f9a57150f51da56a3a3c7a122375b71ba/cs.diff | patch -p0
diff -ru src/Symfony/Component/OptionsResolver/OptionsResolver.php src/Symfony/Component/OptionsResolver/OptionsResolver.php
--- src/Symfony/Component/OptionsResolver/OptionsResolver.php	2014-01-07 08:42:41.139122873 +0000
+++ src/Symfony/Component/OptionsResolver/OptionsResolver.php	2014-01-07 08:42:41.411122873 +0000
@@ -298,7 +298,7 @@
                 if (is_array($allowedValues) && !in_array($options[$option], $allowedValues, true)) {
                     throw new InvalidOptionsException(sprintf('The option "%s" has the value "%s", but is expected to be one of "%s"', $option, $options[$option], implode('", "', $allowedValues)));
                 }
-                
+
                 if (is_callable($allowedValues) && !call_user_func($allowedValues, $options[$option])) {
                     throw new InvalidOptionsException(sprintf('The provided callback did not validate the option "%s"', $option));
                 }

0
Common Typos

0
PHPUnit Optimizations

0
Pull Request Contributor Headers