Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix typo
  • Loading branch information
unexge committed Dec 30, 2015
commit 0c2b48ce09ea08b514c878cbccdfb57b3fa12b1e
8 changes: 4 additions & 4 deletions src/Symfony/Component/OptionsResolver/OptionsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,13 @@ public function getDefinedOptions()
public function setFrozen($optionNames)
{
if ($this->locked) {
throw new AccessException('Options cannot be freeze from a lazy option or normalizer.');
throw new AccessException('Options cannot be frozen from a lazy option or normalizer.');
}

foreach ((array) $optionNames as $option) {
if (!$this->hasDefault($option)) {
throw new MissingDefaultValueException(sprintf(
'The option "%s" has not a default value. You can not freeze it.',
'The option "%s" has no default value. You cannot freeze it.',
$option
));
}
Expand Down Expand Up @@ -721,7 +721,7 @@ public function clear()
* @return array The merged and validated options
*
* @throws UndefinedOptionsException If an option name is undefined
* @throws OptionFrozenException If a frozen option is setted
* @throws OptionFrozenException If a frozen option is set
* @throws InvalidOptionsException If an option doesn't fulfill the
* specified validation rules
* @throws MissingOptionsException If a required option is missing
Expand Down Expand Up @@ -757,7 +757,7 @@ public function resolve(array $options = array())
foreach ($options as $option => $value) {
if (isset($this->frozen[$option])) {
throw new OptionFrozenException(sprintf(
'The option "%s" is frozen. You cannot change it\'s value.',
'The option "%s" is frozen. You cannot change its value.',
$option
));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public function testGetMissingOptions()

/**
* @expectedException \Symfony\Component\OptionsResolver\Exception\OptionFrozenException
* @expectedExceptionMessage The option "foo" is frozen. You cannot change it's value.
* @expectedExceptionMessage The option "foo" is frozen. You cannot change its value.
*/
public function testFailIfFrozenOptionSetted()
{
Expand Down Expand Up @@ -408,7 +408,7 @@ public function testGetFrozenOptions()

/**
* @expectedException \Symfony\Component\OptionsResolver\Exception\MissingDefaultValueException
* @expectedExceptionMessage The option "foo" has not a default value. You can not freeze it.
* @expectedExceptionMessage The option "foo" has no default value. You cannot freeze it.
*/
public function testFailIfUnassignedOptionTryingToFrozen()
{
Expand Down