[OptionsResolver] Fixed typos
This commit is contained in:
parent
256b7081a4
commit
95454f5f6b
@ -57,7 +57,7 @@ class OptionsResolver
|
||||
/**
|
||||
* Sets default option values.
|
||||
*
|
||||
* @param array $options A list of option names as keys and default values
|
||||
* @param array $defaultValues A list of option names as keys and default values
|
||||
* as values. The option values may be closures
|
||||
* of the following signatures:
|
||||
*
|
||||
@ -80,7 +80,7 @@ class OptionsResolver
|
||||
* performance if the previous default value is calculated by an expensive
|
||||
* closure.
|
||||
*
|
||||
* @param array $options A list of option names as keys and default values
|
||||
* @param array $defaultValues A list of option names as keys and default values
|
||||
* as values. The option values may be closures
|
||||
* of the following signature:
|
||||
*
|
||||
@ -218,6 +218,7 @@ class OptionsResolver
|
||||
*
|
||||
* @throws InvalidOptionsException If any of the options has not been
|
||||
* defined.
|
||||
* @throws MissingOptionsException If a required option is missing.
|
||||
*/
|
||||
private function validateOptionNames(array $optionNames)
|
||||
{
|
||||
|
@ -22,7 +22,7 @@ possible, and may only be one of "male" and "female".
|
||||
public function __construct(array $options = array())
|
||||
{
|
||||
$resolver = new OptionsResolver();
|
||||
$this->configureOptions($resolver);
|
||||
$this->configure($resolver);
|
||||
|
||||
$this->options = $resolver->resolve($options);
|
||||
}
|
||||
@ -53,7 +53,7 @@ possible, and may only be one of "male" and "female".
|
||||
|
||||
We can now easily instantiate a Person object:
|
||||
|
||||
// 'gender' is implicitely set to 'female'
|
||||
// 'gender' is implicitly set to 'female'
|
||||
$person = new Person(array(
|
||||
'firstName' => 'Jane',
|
||||
'lastName' => 'Doe',
|
||||
|
@ -16,7 +16,10 @@ use Symfony\Component\OptionsResolver\Options;
|
||||
|
||||
class OptionsResolverTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
private $options;
|
||||
/**
|
||||
* @var OptionsResolver
|
||||
*/
|
||||
private $resolver;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
|
Reference in New Issue
Block a user