killbill/killbill-client-ruby

View on GitHub
lib/killbill_client/models/admin.rb

Summary

Maintainability
B
5 hrs
Test Coverage

Method increment_kb_clock has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

        def increment_kb_clock(days, weeks, months, years, time_zone, options)
          params = {}
          params[:days] = days unless days.nil?
          params[:weeks] = weeks unless weeks.nil?
          params[:months] = months unless months.nil?
Severity: Minor
Found in lib/killbill_client/models/admin.rb - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method get_queues_entries has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

        def get_queues_entries(account_id, queue_name = '', service_name = '', with_history = true, min_date = '', max_date = '', with_in_processing = true, with_bus_events = true, with_notifications = true, options = {})
Severity: Major
Found in lib/killbill_client/models/admin.rb - About 1 hr to fix

    Method fix_transaction_state has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            def fix_transaction_state(payment_id, transaction_id, transaction_status, payment_state_param = {}, user = nil, reason = nil, comment = nil, options = {})
    Severity: Major
    Found in lib/killbill_client/models/admin.rb - About 1 hr to fix

      Method trigger_invoice_generation_for_parked_accounts has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              def trigger_invoice_generation_for_parked_accounts(offset = 0, limit = 100, plugin_property = [], user = nil, reason = nil, comment = nil, options = {})
      Severity: Major
      Found in lib/killbill_client/models/admin.rb - About 50 mins to fix

        Method increment_kb_clock has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                def increment_kb_clock(days, weeks, months, years, time_zone, options)
        Severity: Minor
        Found in lib/killbill_client/models/admin.rb - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status