src/Debugger/Helpers.php
public static function getSuggestion(array $items, string $value): ?string
    {
        $best = null;
        $min = (\strlen($value) / 4 + 1) * 10 + .1;
        foreach (\array_unique($items, SORT_REGULAR) as $item) {
            $item = \is_object($item) ? $item->getName() : $item;
            if (($len = \levenshtein($item, $value, 10, 11, 10)) > 0 && $len < $min) {
                $min = $len;
                $best = $item;
            }
        }

        return $best;
    }
public static function getSuggestion(array $items, string $value): ?string
    {
        $best = null;
        $min = (\strlen($value) / 4 + 1) * 10 + .1;
        foreach (\array_unique($items, SORT_REGULAR) as $item) {
            $item = \is_object($item) ? $item->getName() : $item;
            if (($len = \levenshtein($item, $value, 10, 11, 10)) > 0 && $len < $min) {
                $min = $len;
                $best = $item;
            }
        }

        return $best;
    }
public static function getSuggestion ( array $ items , string $ value ) : ? string { $ best = null ; $ min = ( \ strlen ( $ value ) / 4 + 1 ) * 10 + .1 ; foreach ( \ array_unique ( $ items , SORT_REGULAR ) as $ item ) { $ item = \ is_object ( $ item ) ? $ item -> getName ( ) : $ item ; if ( ( $ len = \ levenshtein ( $ item , $ value , 10 , 11 , 10 ) ) > 0 && $ len < $ min ) { $ min = $ len ; $ best = $ item ; } } return $ best ; }
Finds the best suggestion.

@return string|NULL
Finds the best suggestion .