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

Skip to content

Commit 9c76750

Browse files
committed
[OptionsResolver] Fixed doc and block nesting
1 parent 876fd9b commit 9c76750

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/Symfony/Component/OptionsResolver/Options.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,39 +165,39 @@ public function offsetUnset($option)
165165
}
166166

167167
/**
168-
* @see Iterator::current()
168+
* {@inheritdoc}
169169
*/
170170
public function current()
171171
{
172172
return $this->offsetGet($this->key());
173173
}
174174

175175
/**
176-
* @see Iterator::next()
176+
* {@inheritdoc}
177177
*/
178178
public function next()
179179
{
180180
next($this->options);
181181
}
182182

183183
/**
184-
* @see Iterator::key()
184+
* {@inheritdoc}
185185
*/
186186
public function key()
187187
{
188188
return key($this->options);
189189
}
190190

191191
/**
192-
* @see Iterator::valid()
192+
* {@inheritdoc}
193193
*/
194194
public function valid()
195195
{
196196
return null !== $this->key();
197197
}
198198

199199
/**
200-
* @see Iterator::rewind()
200+
* {@inheritdoc}
201201
*/
202202
public function rewind()
203203
{

src/Symfony/Component/OptionsResolver/OptionsResolver.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,11 @@ private function validateOptionNames(array $optionNames)
253253

254254
sort($diff);
255255

256-
if (count($diff) > 1) {
257-
throw new InvalidOptionsException(sprintf('The options "%s" do not exist. Known options are: "%s"', implode('", "', $diff), implode('", "', $knownOptions)));
258-
}
259-
260256
if (count($diff) > 0) {
257+
if (count($diff) > 1) {
258+
throw new InvalidOptionsException(sprintf('The options "%s" do not exist. Known options are: "%s"', implode('", "', $diff), implode('", "', $knownOptions)));
259+
}
260+
261261
throw new InvalidOptionsException(sprintf('The option "%s" does not exist. Known options are: "%s"', current($diff), implode('", "', $knownOptions)));
262262
}
263263

@@ -268,11 +268,11 @@ private function validateOptionNames(array $optionNames)
268268

269269
sort($diff);
270270

271-
if (count($diff) > 1) {
272-
throw new MissingOptionsException(sprintf('The options "%s" are missing.', implode('", "', $diff)));
273-
}
274-
275271
if (count($diff) > 0) {
272+
if (count($diff) > 1) {
273+
throw new MissingOptionsException(sprintf('The options "%s" are missing.', implode('", "', $diff)));
274+
}
275+
276276
throw new MissingOptionsException(sprintf('The option "%s" is missing.', current($diff)));
277277
}
278278
}

0 commit comments

Comments
 (0)