Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4957fa0

Browse filesBrowse files
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 ------- 0c1484b [OptionsResolver] remove dead code and useless else
2 parents 5d75f14 + 0c1484b commit 4957fa0
Copy full SHA for 4957fa0

File tree

Expand file treeCollapse file tree

1 file changed

+3
-17
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-17
lines changed

‎src/Symfony/Component/OptionsResolver/OptionsResolver.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/OptionsResolver/OptionsResolver.php
+3-17Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.