Showing 1,005 of 1,501 total issues
Method commit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def commit(action, options, verb = :post, payment_method_details = PaymentMethodDetails.new(), &block)
Method add_cim_auth_purchase
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_cim_auth_purchase(xml, transaction_type, amount, payment, options)
Method add_auth_purchase
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_auth_purchase(xml, transaction_type, amount, payment, options)
Method build_field_value_array
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_field_value_array(soap, tag_name, type, custom_data, fields)
Method build_void_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_void_request(money, transaction_id, approval, token, options)
Method api_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def api_request(action, request, verb, payment_method_details, options)
Method auth_digest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def auth_digest(method, action, post, authorization = nil, options = {})
Method headers
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def headers(method, action, post, authorization = nil, options = {})
Method add_mobile_credit_card
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_mobile_credit_card(post, payment, options, specifics_inputs, expirydate)
Method order_request
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def order_request(action, amount, post, credit_card, options = {})
Method authorization_from
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def authorization_from(success, url, method, response, options)
Method auth_or_sale
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def auth_or_sale(method, authorization, amount, credit_card, options = {})
Method auth_or_sale
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def auth_or_sale(post, transaction_type, amount, payment_method, options)
Method add_auth_purchase
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_auth_purchase(post, pair_value, money, credit_card_or_reference, options)
Method commit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def commit(method, url, parameters = nil, options = {}, type = false)
Method add_address
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_address(xml, payment_method, address, options, shipTo = false)
Method add_invoice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_invoice(doc, action, money, payment_method, options)
Method store
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def store(creditcard, options = {})
post = {}
add_creditcard(post, creditcard, options)
post[:description] = options[:description]
post[:email] = options[:email]
- 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 add_payment_source
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_payment_source(post, payment_source, options)
add_d3d(post, options) if options[:d3d] || three_d_secure(options)
if payment_source.is_a?(String)
add_alias(post, payment_source, options[:alias_operation])
add_eci(post, options[:eci] || '9')
- 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 add_payment_method
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_payment_method(post, payment_method)
if payment_method.respond_to? :brand
post[:NameOnCard] = payment_method.name if payment_method.name
post[:ExpDate] = expdate(payment_method)
post[:CardNum] = payment_method.number
- 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"