[OptionsResolver] Fixed doc and block nesting
This commit is contained in:
parent
876fd9ba17
commit
9c76750cb8
@ -165,7 +165,7 @@ class Options implements ArrayAccess, Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Iterator::current()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function current()
|
||||
{
|
||||
@ -173,7 +173,7 @@ class Options implements ArrayAccess, Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Iterator::next()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function next()
|
||||
{
|
||||
@ -181,7 +181,7 @@ class Options implements ArrayAccess, Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Iterator::key()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function key()
|
||||
{
|
||||
@ -189,7 +189,7 @@ class Options implements ArrayAccess, Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Iterator::valid()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
@ -197,7 +197,7 @@ class Options implements ArrayAccess, Iterator
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Iterator::rewind()
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function rewind()
|
||||
{
|
||||
|
@ -253,11 +253,11 @@ class OptionsResolver
|
||||
|
||||
sort($diff);
|
||||
|
||||
if (count($diff) > 0) {
|
||||
if (count($diff) > 1) {
|
||||
throw new InvalidOptionsException(sprintf('The options "%s" do not exist. Known options are: "%s"', implode('", "', $diff), implode('", "', $knownOptions)));
|
||||
}
|
||||
|
||||
if (count($diff) > 0) {
|
||||
throw new InvalidOptionsException(sprintf('The option "%s" does not exist. Known options are: "%s"', current($diff), implode('", "', $knownOptions)));
|
||||
}
|
||||
|
||||
@ -268,11 +268,11 @@ class OptionsResolver
|
||||
|
||||
sort($diff);
|
||||
|
||||
if (count($diff) > 0) {
|
||||
if (count($diff) > 1) {
|
||||
throw new MissingOptionsException(sprintf('The options "%s" are missing.', implode('", "', $diff)));
|
||||
}
|
||||
|
||||
if (count($diff) > 0) {
|
||||
throw new MissingOptionsException(sprintf('The option "%s" is missing.', current($diff)));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user