Showing 339 of 417 total issues
Method route
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
def route(conn_data)
# we cannot set request_default_encodingsyle before parsing the content.
env = unmarshal(conn_data)
if env.nil?
raise ArgumentError.new("illegal SOAP marshal format")
Method dump_porttype
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def dump_porttype(porttype)
class_name = mapped_class_name(porttype.name, @modulepath)
defined_const = {}
methoddef = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
wsdl_name = @definitions.name ? @definitions.name.name : 'default'
Method start_element
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def start_element(name, raw_attrs)
lastframe = @parsestack.last
ns = parent = parent_encodingstyle = nil
if lastframe
ns = lastframe.ns
Method decode_soap_envelope
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def decode_soap_envelope(ns, ele, attrs, parent)
o = nil
if ele.name == EleEnvelope
o = SOAPEnvelope.new
if ext = @opt[:external_content]
Method dump_porttype
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def dump_porttype(porttype)
class_name = mapped_class_name(porttype.name, @modulepath)
defined_const = {}
methoddef = MethodDefCreator.new(@definitions, @name_creator, @modulepath, defined_const).dump(porttype.name)
wsdl_name = @definitions.name ? @definitions.name.name : 'default'
Method encode_data
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def encode_data(generator, ns, data, parent)
attrs = {}
# ASPDotNetHandler is intended to be used for accessing an ASP.NET doc/lit
# service as an rpc/encoded service. in the situation, local elements
# should be qualified. propagate parent's namespace to children.
Method unmarshal
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def unmarshal(conn_data, opt)
contenttype = conn_data.receive_contenttype
xml = nil
if /#{MIMEMessage::MultipartContentType}/i =~ contenttype
opt[:external_content] = {}
Method initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(soapaction, name, param_def, opt)
@soapaction = soapaction
@name = name
@request_style = opt[:request_style]
@response_style = opt[:response_style]
Method from_obj
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.from_obj(obj, namespace = nil)
return obj if obj.is_a?(SOAPElement)
o = SOAPElement.new(nil)
case obj
when nil
Method create_type_name
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_type_name(modulepath, element)
if element.type == XSD::AnyTypeName
# nil means anyType.
nil
elsif simpletype = @simpletypes[element.type]
- 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_methods
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def dump_methods
methods = {}
@methoddef.each do |visibility, method|
(methods[visibility] ||= []) << method
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
Method start_element
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def start_element(name, raw_attrs)
lastframe = @parsestack.last
ns = parent = parent_encodingstyle = nil
if lastframe
ns = lastframe.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 _to_s
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _to_s
str = ''
str << @sign if @sign
str << 'P'
l = ''
- 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 assign_name
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def assign_name(qname, modulepath = nil)
key = [modulepath, qname]
unless @classname.key?(key)
if klass = ::SOAP::TypeMap[qname]
name =
- 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_entry_item
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def dump_entry_item(var, key, dump_type = :none)
if var.key?(key)
case dump_type
when :none
":#{key} => #{var[key]}"
- 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 screen_data
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def screen_data(value)
# "NaN".to_f => 0 in some environment. libc?
if value.is_a?(Float)
return narrow32bit(value)
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
Method add_elesoap2stubobj
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def add_elesoap2stubobj(node, obj, definition)
vars = {}
node.each do |name, value|
item = definition.elements.find_element(value.elename)
if item
- 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 _obj2soap
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _obj2soap(obj, type_qname = nil)
ret = nil
if obj.is_a?(SOAPCompoundtype)
obj.replace do |ele|
Mapping._obj2soap(ele, self)
- 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 add_elesoap2stubobj
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def add_elesoap2stubobj(node, obj, definition)
vars = {}
node.each do |name, value|
item = definition.elements.find_element(value.elename)
if item
- 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 usage_exit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
def usage_exit
puts <<__EOU__
Usage: #{ $0 } --wsdl wsdl_location [options]
wsdl_location: filename or URL