Showing 338 of 416 total issues
Method stubobj2soap_elements
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def stubobj2soap_elements(obj, ele, definition, is_choice = false)
added = false
case definition
when SchemaSequenceDefinition, SchemaEmptyDefinition
definition.each do |eledef|
- 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
File factory.rb
has 329 lines of code (exceeds 250 allowed). Consider refactoring. Open
module SOAP
module Mapping
class Factory
Method decode_tag
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def decode_tag(ns, name, attrs, parent)
o = nil
elename = ns.parse(name)
if !parent
if elename == SchemaName
- 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 rubytypestruct2obj
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def rubytypestruct2obj(node, info, map, rubytype)
klass = rubytype ? Mapping.class_from_name(rubytype) : nil
obj = nil
case node.type
when TYPE_HASH
- 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 decode_tag
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def decode_tag(ns, name, attrs, parent)
o = nil
elename = ns.parse(name)
if !parent
if elename == DefinitionsName
- 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 encode_data
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def encode_data(generator, ns, data, parent)
attrs = {}
name = generator.encode_name(ns, data, attrs)
if data.type and data.type.name and
(@generate_explicit_type or data.force_typed)
- 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 dump
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
def dump
buf = ""
unless @requirepath.empty?
buf << dump_requirepath
end
- 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
Class Driver
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class Driver
include AttrProxy
attr_proxy :endpoint_url, true
attr_proxy :mapping_registry, true
File element.rb
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'soap/baseData'
require 'soap/rpc/methodDef'
module SOAP
Method parse_attr
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def parse_attr(attr, value)
case attr
when NameAttrName
# namespace may be nil
if directelement? or elementform == 'qualified'
- 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
Class SOAPHandler
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
class SOAPHandler < Handler
Namespace = SOAP::EncodingNamespace
add_handler
def initialize(charset = nil)
Method dump
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def dump(varname)
@varname = varname
result = ''
str = dump_complextype
unless str.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 decode_tag_by_wsdl
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
def decode_tag_by_wsdl(ns, elename, typestr, parent, arytypestr, attrs)
o = nil
if parent.class == SOAPBody
# root element: should branch by root attribute?
if @is_first_top_ele
- 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 encode_data
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
def encode_data(generator, ns, data, parent)
attrs = {}
name = generator.encode_name(ns, data, attrs)
if data.type and data.type.name and
(@generate_explicit_type or data.force_typed)
Class Proxy
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
class Proxy
include SOAP
public
Method set_attributes
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def self.set_attributes(obj, values)
case obj
when ::SOAP::Mapping::Object
values.each do |attr_name, value|
obj.__add_xmlele_value(attr_name, 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 parse_schema_element_definition
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def self.parse_schema_element_definition(schema_element, default_ns)
if schema_element[0] == :choice
parse_schema_definition(schema_element, default_ns)
elsif schema_element[0].is_a?(Array)
parse_schema_definition(schema_element, default_ns)
- 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 unknownstubobj2soap
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def unknownstubobj2soap(obj, definition)
return SOAPNil.new if obj.nil?
if definition.elements.size == 0
ele = Mapping.obj2soap(obj)
ele.elename = definition.elename if definition.elename
- 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 dump_method_signatures
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def dump_method_signatures(servicename = nil, portname = nil)
targetservice = XSD::QName.new(@wsdl.targetnamespace, servicename) if servicename
targetport = XSD::QName.new(@wsdl.targetnamespace, portname) if portname
sig = []
element_definitions = @wsdl.collect_elements
- 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 parse_elements
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_elements(elements, base_namespace, mpath, opt)
schema_element = []
any = false
elements.each do |element|
case element