Showing 339 of 417 total issues
Method create_schema_definition
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def self.create_schema_definition(klass, definition)
schema_ns = definition[:schema_ns]
schema_name = definition[:schema_name]
schema_type = definition[:schema_type]
is_anonymous = definition[:is_anonymous]
Method __define_attr_accessor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __define_attr_accessor(qname)
# untaint depends GenSupport.safemethodname
name = Mapping.safemethodname(qname.name).untaint
# untaint depends on QName#dump
qnamedump = qname.dump.untaint
Method web_client
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def web_client
return @web_client if @web_client
begin
require 'httpclient'
@web_client = HTTPClient
- 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 child_type
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def child_type(name = nil)
case compoundtype
when :TYPE_STRUCT
if ele = find_element(name)
ele.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 find_soapenc_arytype
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def find_soapenc_arytype
unless compoundtype == :TYPE_ARRAY
raise RuntimeError.new("Assert: not for array")
end
if complexcontent
- 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_file
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def create_file
@modulepath = @opt['module_path']
create_classdef if @opt.key?('classdef')
create_mapping_registry if @opt.key?('mapping_registry')
create_servant_skelton(@opt['servant_skelton']) if @opt.key?('servant_skelton')
- 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 child_defined_complextype
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def child_defined_complextype(name)
ele = nil
case compoundtype
when :TYPE_STRUCT, :TYPE_MAP
unless ele = find_element(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_attribute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def dump_attribute(target = nil)
@attributes.collect { |attribute|
next if target and target != attribute.name
if attribute.local_simpletype
c = create_simpletypedef(@modulepath, attribute.name, attribute.local_simpletype)
- 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_time
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def to_time
begin
if @data.offset * DayInSec == Time.now.utc_offset
d = @data
usec = (RUBY_VERSION.to_f >= 1.9) ? (d.sec_fraction * SecInMicro).to_i : (d.sec_fraction * DayInMicro).round
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def screen_data(value)
if value.is_a?(String)
str = value.strip
if str == 'true' || str == '1'
true
- 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 setdefinediv2soap
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def setdefinediv2soap(ele, obj, map)
definition = Mapping.schema_definition_classdef(obj.class)
definition.elements.each do |eledef|
child = Mapping.get_attribute(obj, eledef.varname)
# extract method
- 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 soap2obj
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def soap2obj(node, klass = nil)
if map = @soap2obj[node.class]
map.each do |obj_class, factory, info|
next if klass and obj_class != klass
conv, obj = factory.soap2obj(obj_class, node, info, @registry)
- 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 obj2elesoap
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def obj2elesoap(obj, eledef)
ele = nil
qualified = (eledef.elementform == 'qualified')
if obj.is_a?(SOAPNil)
ele = obj
- 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 addextend2soap
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def addextend2soap(node, obj)
return if [Symbol, Integer, Float].any?{ |c| obj.is_a?(c) }
return if FIXNUM_PRESENT && obj.is_a?(FixnumShim)
return if BIGNUM_PRESENT && obj.is_a?(BignumShim)
return if obj.is_a?(String) && obj.frozen?
- 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_parent
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def decode_parent(parent, node)
return unless parent.node
case parent.node
when SOAPUnknown
newparent = parent.node.as_struct
- 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 initialize
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def initialize(soapaction, param_def, opt)
@soapaction = soapaction
@request_style = opt[:request_style]
@response_style = opt[:response_style]
@request_use = opt[:request_use]
- 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 fault
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def fault(e, wsdl_fault_details)
if e.is_a?(UnhandledMustUnderstandHeaderError)
faultcode = FaultCode::MustUnderstand
else
faultcode = FaultCode::Server
- 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_attribute
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def self.get_attribute(obj, attr_name)
case obj
when ::SOAP::Mapping::Object
return obj[attr_name]
when ::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 unmarshal
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def unmarshal(conn_data)
xml = nil
opt = {}
contenttype = conn_data.receive_contenttype
if /#{MIMEMessage::MultipartContentType}/i =~ contenttype
- 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_encoded
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_encoded(str)
if @use_numeric_character_reference and !XSD::Charset.is_us_ascii(str)
str.gsub!(@encode_char_regexp) { |c| EncodeMap[c] }
str.unpack("U*").collect { |c|
if c == 0x9 or c == 0xa or c == 0xd or (c >= 0x20 and c <= 0x7f)
- 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"