Method verify_call
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
def self.verify_call(obj, sym, *args, &block)
compare = *args
behaves_like_ruby_1_9 = *[]
if (behaves_like_ruby_1_9)
compare = compare.first if compare.length <= 1
- 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 verify_call
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.verify_call(obj, sym, *args, &block)
compare = *args
behaves_like_ruby_1_9 = *[]
if (behaves_like_ruby_1_9)
compare = compare.first if compare.length <= 1
Method verify_count
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def self.verify_count
mocks.each do |key, proxies|
obj = objects[key]
proxies.each do |proxy|
qualifier, count = proxy.count
- 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 install_method
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.install_method(obj, sym, type=nil)
meta = obj.singleton_class
key = replaced_key obj, sym
sym = sym.to_sym
- 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 cleanup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def self.cleanup
objects.each do |key, obj|
if obj.kind_of? MockIntObject
clear_replaced key
next
- 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"