public static function getFuzzyDistance(string $term, $mode): int
    {
        if (self::MODE_1 === $mode) {
            return 1;
        }

        if (self::MODE_2 === $mode) {
            return 2;
        }

        if (strlen($term) < 3) {
            return 1;
        }

        return 2;
    }
public static function getFuzzyDistance(string $term, $mode): int
    {
        if (self::MODE_1 === $mode) {
            return 1;
        }

        if (self::MODE_2 === $mode) {
            return 2;
        }

        if (strlen($term) < 3) {
            return 1;
        }

        return 2;
    }
public static function getFuzzyDistance ( string $ term , $ mode ) : int { if ( self :: MODE_1 === $ mode ) { return 1 ; } if ( self :: MODE_2 === $ mode ) { return 2 ; } if ( strlen ( $ term ) < 3 ) { return 1 ; } return 2 ; }
Returns distance for given mode.

@param mixed $mode

@return int
Returns distance for given mode .