Skip to content

Commit 1cf7d8e

Browse files
ronfroynicolas-grekas
authored andcommitted
[OptionsResolver] remove dead code and useless else
1 parent 994f48b commit 1cf7d8e

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

OptionsResolver.php

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,9 @@ public function offsetGet($option)
770770

771771
// Don't include closures in the exception message
772772
continue;
773-
} elseif ($value === $allowedValue) {
773+
}
774+
775+
if ($value === $allowedValue) {
774776
$success = true;
775777
break;
776778
}
@@ -1060,20 +1062,4 @@ private static function isValueValidType($type, $value)
10601062
{
10611063
return (\function_exists($isFunction = 'is_'.$type) && $isFunction($value)) || $value instanceof $type;
10621064
}
1063-
1064-
/**
1065-
* @return array
1066-
*/
1067-
private function getInvalidValues(array $arrayValues, $type)
1068-
{
1069-
$invalidValues = array();
1070-
1071-
foreach ($arrayValues as $key => $value) {
1072-
if (!self::isValueValidType($type, $value)) {
1073-
$invalidValues[$key] = $value;
1074-
}
1075-
}
1076-
1077-
return $invalidValues;
1078-
}
10791065
}

0 commit comments

Comments
 (0)