Showing 8 of 8 total issues
Method deferred_validate
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def deferred_validate(values)
cur_values = retrieve
devfail("#{cur_values} is not an array") unless cur_values.instance_of?(Array)
values.each do |v|
- 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_param_type
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def self.create_param_type(target_class, method_suffix, &block_constant)
target_class.send(:define_method,
"new_#{method_suffix}") do |name, options = {}, &block_specific|
gen_method = options[:create_property] ? :newproperty : :newparam
- 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 autorequire
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def autorequire(rel_catalog = nil)
res = []
role = rel_catalog.resource(:'I2b2::I2b2_user', self[:username])
fail("Could not find I2b2::I2b2_user[#{self[:username]}]") if role.nil?
- 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 insync?
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def insync?(is)
return false if is == :absent
# go over each one
result = true
- 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 refresh
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def refresh
original = template_values
result = template_values.merge resource[:values]
unless resource.allow_new?
- 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 roles=
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def roles=(should_roles)
new_roles = should_roles - roles
removed_roles = roles - should_roles
unless new_roles.empty?
- 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 values
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def values
return @property_hash[:values] if @property_hash.has_key? :values
@property_hash[:values] = begin
sql = "SELECT #{value_columns} FROM #{table} #{where_clause}"
- 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 current_values
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def current_values
return @current_values unless @current_values.nil?
return :absent unless File.file? resource[:target]
@current_values = load resource[:target]
- 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"