Showing 339 of 417 total issues
Method screen_data_str
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def screen_data_str(str)
/^([+\-]?)(\d*)(?:\.(\d*)?)?$/ =~ str.to_s.strip
unless Regexp.last_match
raise ValueSpaceError.new("#{ type }: cannot accept '#{ str }'.")
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 dump_element
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def dump_element(target = nil)
@elements.collect { |ele|
next if @complextypes[ele.name]
next if target and target != ele.name
c = create_elementdef(@modulepath, 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 dump_attributes
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def dump_attributes
str = ""
@attrdef.each do |attrname, writable, varname|
varname ||= attrname
if attrname == varname
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def dump(porttype = nil)
result = "require 'soap/rpc/driver'\n\n"
if @modulepath
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
modulepath.each do |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
has a Cognitive Complexity of 10 (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 dump
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def dump(porttype = nil)
result = ""
if @modulepath
result << "\n"
modulepath = @modulepath.respond_to?(:lines) ? @modulepath.lines : @modulepath # RubyJedi: compatible with Ruby 1.8.6 and above
- 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 find_operation
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find_operation
porttype.operations.each do |op|
next if op.name != @name
next if op.input and @input and op.input.name and @input.name and
op.input.name != @input.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 stubobj2soap
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def stubobj2soap(obj, qname, definition)
if obj.nil?
ele = SOAPNil.new
ele.elename = qname
elsif obj.is_a?(::String)
- 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
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def call(name, *params)
# name must be used only for lookup
op_info = lookup_operation(name)
mapping_opt = create_mapping_opt
req_header = create_request_header
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
def encode_data(generator, ns, data, parent)
attrs = encode_attrs(generator, ns, data, parent)
if parent && parent.is_a?(SOAPArray) && parent.position
attrs[ns.name(AttrPositionName)] = "[#{parent.position.join(',')}]"
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 any2obj
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def any2obj(node, obj_class = nil)
is_compound = node.is_a?(::SOAP::SOAPCompoundtype)
# trust xsi:type first
if is_compound and node.type
definition = schema_definition_from_type(node.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 complexobj2sequencesoap
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def complexobj2sequencesoap(obj, soap, type, nillable, is_choice)
added = false
type.elements.each do |child_ele|
case child_ele
when WSDL::XMLSchema::Any
- 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 find_port
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find_port(servicename = nil, portname = nil)
service = port = nil
if servicename
service = @wsdl.service(
XSD::QName.new(@wsdl.targetnamespace, servicename))
- 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 []=
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def []=(*idxary)
value = idxary.slice!(-1)
if idxary.size != @rank
raise ArgumentError.new("given #{idxary.size} params(#{idxary}) does not match rank: #{@rank}")
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 encode_data
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def encode_data(ns, obj, parent)
if obj.respond_to?(:to_xmlpart)
formatted = trim_eol(obj.to_xmlpart)
formatted = trim_indent(formatted)
formatted = formatted.gsub(/^/, @indent).sub(/\n+\z/, '')
- 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 create_array_element_definition
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def create_array_element_definition(typedef, mpath)
child_type = typedef.child_type
child_element = typedef.find_aryelement
if child_type == XSD::AnyTypeName
type = nil
Method decode_defined_complextype
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def decode_defined_complextype(elename, typename, typedef, arytypestr)
case typedef.compoundtype
when :TYPE_STRUCT, :TYPE_MAP
o = SOAPStruct.decode(elename, typename)
o.definedtype = typedef
Method dump_inout_type
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def dump_inout_type(param, element_definitions)
if param
message = param.find_message
params = ""
message.parts.each do |part|
Method define_attribute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def define_attribute(c, attributes)
const = {}
unless attributes.empty?
c.def_method("__xmlattr") do <<-__EOD__
@__xmlattr ||= {}
Method do_POST
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def do_POST(req, res)
logger.debug { "SOAP request: " + req.body } if logger
if @authenticator
@authenticator.authenticate(req, res)
# you can check authenticated user with SOAP::RPC::SOAPlet.user