Method verify_response
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def verify_response(params, secret)
logstr = ''
params.each { |key, value|
logstr += "#{key} #{value}\n"
}
- 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
File wirecard_checkout_page.rb
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
module OffsitePayments #:nodoc:
module Integrations #:nodoc:
# Shop System Plugins - Terms of use
#
# This terms of use regulates warranty and liability between Wirecard Central Eastern Europe (subsequently referred to as WDCEE) and it's
Method verify_response
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def verify_response(params, secret)
logstr = ''
params.each { |key, value|
logstr += "#{key} #{value}\n"
}
Method add_standard_fields
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_standard_fields
addfields = {}
addfields['shopId'] = @shop_id if !@shop_id.blank?
addfields['paymentType'] = @paymenttype
- 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 response
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def response(umessage = nil)
if @message || umessage
'<QPAY-CONFIRMATION-RESPONSE result="NOK" message="' + CGI.escapeHTML(umessage ? umessage : @message) + '"/>'
else
'<QPAY-CONFIRMATION-RESPONSE result="OK"/>'
- 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"