Showing 41 of 50 total issues
Method buildMenu
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
def buildMenu
@mainMenu = NSMenu.new
appName = NSBundle.mainBundle.infoDictionary['CFBundleName']
addMenu(appName) do
Method handle_result
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private def handle_result(result_data, error, handler)
if result_data
result = {
data: result_data,
attitude: result_data.attitude,
Method set_deferred_status
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def set_deferred_status(status, *args)
cancel_timeout
@errbacks ||= nil
@callbacks ||= nil
@deferred_status = status
- 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 play
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def play(content_url, options = {}, &block)
options = {
delay_play: false
}.merge(options)
- 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 picture
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
def picture(options = {}, presenting_controller = nil, &block)
@callback = block
@callback.weak! if @callback && BubbleWrap.use_weak_callbacks?
@options = {
Method handle_result
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private def handle_result(result_data, error, handler)
if result_data
result = {
data: result_data,
attitude: result_data.attitude,
- 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 picture
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def picture(options = {}, presenting_controller = nil, &block)
@callback = block
@callback.weak! if @callback && BubbleWrap.use_weak_callbacks?
@options = {
- 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 get
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def get(base, *values)
if values.is_a? NSArray
value = values.size == 1 ? values.first : values.flatten
else
value = values
- 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 setup_gesture
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
def setup_gesture
@panned_recognizer = self.whenPanned do |recognizer|
case(recognizer.state)
when UIGestureRecognizerStateBegan
@last_position = self.position
Method play
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
def play(content_url, options = {}, &block)
options = {
delay_play: false
}.merge(options)
Method future
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def future arg, cb=nil, eb=nil, &blk
arg = arg.call if arg.respond_to?(:call)
if arg.respond_to?(:set_deferred_status)
if cb || eb
- 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 new
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def new(params = {}, *args)
if params.is_a?(UIFont)
return params
end
_font = nil
Method styled
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def styled(type, *objects, &block)
if block.nil?
action = nil
else
block.weak! if BubbleWrap.use_weak_callbacks?
Method new
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def new(params = {}, *args)
if params.is_a?(UIFont)
return params
end
_font = 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 styled
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def styled(type, *objects, &block)
if block.nil?
action = nil
else
block.weak! if BubbleWrap.use_weak_callbacks?
- 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 new
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def new(options = {}, presenting_controller = nil, &block)
options = {
activities: nil,
animated: true
}.merge(options)
- 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 get
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get(options = {}, &block)
@callback = block
@callback.weak! if @callback && BubbleWrap.use_weak_callbacks?
@options = {
authorization_type: :always,
- 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 plain_text_input
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def plain_text_input(options = {}, &block)
options = {buttons: ["Cancel", "OK"],
cancel_button_index: 0}.merge!(options)
options[:style] = :plain_text_input
new(options, &block).tap do |view|
- 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 get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get(options = {}, &block)
@callback = block
@callback.weak! if @callback && BubbleWrap.use_weak_callbacks?
@options = {
authorization_type: :always,
Method initialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def initialize(interval, *args, &blk)
callback = args.first.respond_to?(:call) ? args.first : blk
raise ArgumentError, "No callback or block supplied to periodic timer" unless callback
callback.weak! if callback && BubbleWrap.use_weak_callbacks?
- 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"