minor #28458 [OptionsResolver] remove dead code and useless else (ronfroy)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #28458).
Discussion
----------
[OptionsResolver] remove dead code and useless else
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
<!--
remove dead method and useless else
-->
Commits
-------
0c1484b849
[OptionsResolver] remove dead code and useless else
This commit is contained in:
commit
4957fa0c83
@ -770,7 +770,9 @@ class OptionsResolver implements Options
|
||||
|
||||
// Don't include closures in the exception message
|
||||
continue;
|
||||
} elseif ($value === $allowedValue) {
|
||||
}
|
||||
|
||||
if ($value === $allowedValue) {
|
||||
$success = true;
|
||||
break;
|
||||
}
|
||||
@ -1060,20 +1062,4 @@ class OptionsResolver implements Options
|
||||
{
|
||||
return (\function_exists($isFunction = 'is_'.$type) && $isFunction($value)) || $value instanceof $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
private function getInvalidValues(array $arrayValues, $type)
|
||||
{
|
||||
$invalidValues = array();
|
||||
|
||||
foreach ($arrayValues as $key => $value) {
|
||||
if (!self::isValueValidType($type, $value)) {
|
||||
$invalidValues[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $invalidValues;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user