File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments