8000 minor #31251 [FrameworkBundle] Drop unused private method (chalasr) · symfony/symfony@be80868 · GitHub
[go: up one dir, main page]

Skip to content

Commit be80868

Browse files
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 ------- 1e9a9b2 [FrameworkBundle] Drop unused private method
2 parents fba11b4 + 1e9a9b2 commit be80868

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/Symfony/Component/Messenger/Command/ConsumeMessagesCommand.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -249,21 +249,4 @@ private function convertToBytes(string $memoryLimit): int
249249

250250
return $max;
251251
}
252-
253-
private function findAlternatives($name, array $collection)
254-
{
255-
$alternatives = [];
256-
foreach ($collection as $item) {
257-
$lev = levenshtein($name, $item);
258-
if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) {
259-
$alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev;
260-
}
261-
}
262-
263-
$threshold = 1e3;
264-
$alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; });
265-
ksort($alternatives, SORT_NATURAL | SORT_FLAG_CASE);
266-
267-
return array_keys($alternatives);
268-
}
269252
}

0 commit comments

Comments
 (0)
0