def all_number_types(phone, data, not_valid = false)
      response = { valid: [], possible: [] }

      types_for_check(data).each do |type|
        possible, valid = get_patterns(data, type)

        valid_and_possible, possible_result =
            number_valid_and_possible?(phone, possible, valid, not_valid)
        response[:possible] << type if possible_result
        response[:valid] << type if valid_and_possible
      end

      sanitize_fixed_mobile(response)
    end
def all_number_types(phone, data, not_valid = false)
      response = { valid: [], possible: [] }

      types_for_check(data).each do |type|
        possible, valid = get_patterns(data, type)

        valid_and_possible, possible_result =
            number_valid_and_possible?(phone, possible, valid, not_valid)
        response[:possible] << type if possible_result
        response[:valid] << type if valid_and_possible
      end

      sanitize_fixed_mobile(response)
    end
Returns all valid and possible phone number types for currently parsed
 phone for provided data hash.

 ==== Attributes

 * +phone+ - phone number for parsing
 * +data+  - country data
 * +not_valid+ - specifies that number is not valid by general desc pattern