Method find_or_create
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def self.find_or_create(params, session, a_rails_request, options = {} )
# Pull out the http params that are for the context object,
- 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_new_request!
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.create_new_request!( args )
# all of these are required
params = args[:params]
session = args[:session]
Method create_new_request!
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def self.create_new_request!( args )
# all of these are required
params = args[:params]
session = args[:session]
- 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 context_object_params
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def self.context_object_params(a_rails_request)
# GET params
co_params = CGI::parse( a_rails_request.query_string )
# add in the POST params please
- 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 co_params_fingerprint
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.co_params_fingerprint(params)
# Don't use ctx_time, consider two co's equal if they are equal but for ctx_tim.
# exclude cache-busting "_" key that JQuery adds. Fine to bust HTTP cache, but
# don't want to it to force new Umlaut processing.
- 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_service_response
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def add_service_response(response_data)
raise ArgumentError.new("missing required `:service` key") unless response_data[:service].kind_of?(Service)
raise ArgumentError.new("missing required `:service_type_value` key") unless response_data[:service_type_value]
- 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 service_types_in_progress?
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def service_types_in_progress?(type_array)
# convert strings to ServiceTypeValues
type_array = type_array.collect {|s| s.kind_of?(ServiceTypeValue)? s : ServiceTypeValue[s] }
self.services_in_progress.each do |s|
- 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"