Class Soap
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
class Soap
# A [simple](http://wanderingbarque.com/nonintersecting/2006/11/15/the-s-stands-for-simple/) Soap client for the Argos satellite tracking webservice operated by CLS
# client [Savon] (version 3)
File soap.rb
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
require "savon"
module Argos
class Soap
Method _call_xml_operation
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _call_xml_operation(op_sym, body, extract=nil)
@operation = _operation(op_sym)
@operation.body = body
@response = operation.call
- 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 _call_xml_operation
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def _call_xml_operation(op_sym, body, extract=nil)
@operation = _operation(op_sym)
@operation.body = body
@response = operation.call
Method baseRequest
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def baseRequest
# if override key is platformId... delete programNumber...
# if override key is period... delete nbDaysFromNow...
baseRequest = { username: _username, password: _password }
- 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 _extract_motm
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _extract_motm
lambda {|response|
# Scan for MOTM signature --uuid:*
if response.raw =~ (/^(--[\w:-]+)--$/)
# Get the last message, which is -2 because of the trailing --
- 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 programs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def programs
platformList = getPlatformList
if platformList.key?("data") and platformList["data"].key?("program")
platformList_data_program = platformList["data"]["program"].is_a?(Array) ? platformList["data"]["program"] : [platformList["data"]["program"]]
- 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"