Showing 146 of 200 total issues
Method create_proc_condition_for_wait_for_plugin_command_completion
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_proc_condition_for_wait_for_plugin_command_completion(options, plugin_key, plugin_version, state=nil, is_negate=false)
Method add_email
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_email(email, user = nil, reason = nil, comment = nil, options = {})
Method create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create(use_global_default=true, user = nil, reason = nil, comment = nil, options = {})
Method refresh_payment_with_failure_handling
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def refresh_payment_with_failure_handling(follow_location, refresh_options)
begin
created_transaction = yield
rescue KillBillClient::API::ResponseError => error
response = error.response
- Read upRead up
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 create_entitlement_with_add_on
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_entitlement_with_add_on(entitlements, entitlement_date, billing_date, migrated = false, rename_key_if_exists_and_unused = true, call_completion_sec = nil, user = nil, reason = nil, comment = nil, options = {})
params = {}
params[:entitlementDate] = entitlement_date if entitlement_date
params[:billingDate] = billing_date if billing_date
params[:migrated] = migrated
- Read upRead up
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 create_http_client
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_http_client(uri, options = {})
http = ::Net::HTTP.new uri.host, uri.port
if options[:read_timeout].is_a? Numeric
http.read_timeout = options[:read_timeout].to_f / 1000
elsif KillBillClient.read_timeout.is_a? Numeric
- Read upRead up
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"