minor #31251 [FrameworkBundle] Drop unused private method (chalasr)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[FrameworkBundle] Drop unused private method

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | n/a
| New feature?  | n/a
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

1e9a9b2c06 [FrameworkBundle] Drop unused private method
This commit is contained in:
Nicolas Grekas 2019-04-26 09:43:13 +02:00
commit be80868ba3

View File

@ -249,21 +249,4 @@ EOF
return $max;
}
private function findAlternatives($name, array $collection)
{
$alternatives = [];
foreach ($collection as $item) {
$lev = levenshtein($name, $item);
if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) {
$alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
}
}
$threshold = 1e3;
$alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; });
ksort($alternatives, SORT_NATURAL | SORT_FLAG_CASE);
return array_keys($alternatives);
}
}