Showing 390 of 605 total issues
Function processContentPI
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Data.Region.processContentPI = function(inStr)
{
var outStr = "";
var regexp = /<!--\s*<\/?spry:content\s*[^>]*>\s*-->/mg;
var searchStartIndex = 0;
Function getNodesByFunc
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Utils.getNodesByFunc = function(root, func)
{
var nodeStack = new Array;
var resultArr = new Array;
var node = root;
Function request
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
request: function(url) {
this.url = url;
this.method = this.options.method;
var params = Object.isString(this.options.parameters) ?
this.options.parameters :
Function Selector
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Prototype.Selector = (function() {
function select() {
throw new Error('Method "Prototype.Selector.select" must be defined.');
}
Function moveTo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Widget.SelectionDescriptor.prototype.moveTo = function(start, end)
{
if (Spry.is.ie && Spry.is.windows) {
if (this.element.nodeName == "TEXTAREA") {
var ta_range = this.element.createTextRange();
Function xpathSort
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xpathSort(input, sort) {
if (sort.length == 0) {
return;
}
Function embedSWF
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
Function ATTR
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
ATTR: function(elem, match){
var name = match[1],
result = Expr.attrHandle[ name ] ?
Expr.attrHandle[ name ]( elem ) :
elem[ name ] != null ?
Function dirNodeCheck
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
var sibDir = dir == "previousSibling" && !isXML;
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
var elem = checkSet[i];
if ( elem ) {
Function serializeElements
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
serializeElements: function(elements, options) {
if (typeof options != 'object') options = { hash: !!options };
else if (Object.isUndefined(options.hash)) options.hash = true;
var key, value, submitted = false, submit = options.submit, accumulator, initial;
Function readAttribute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
readAttribute: function(element, name) {
element = $(element);
if (Prototype.Browser.IE) {
var t = Element._attributeTranslations.read;
if (t.values[name]) return t.values[name](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
Function replace
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Element.Methods.replace = function(element, content) {
element = $(element);
if (content && content.toElement) content = content.toElement();
if (Object.isElement(content)) {
- 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
Function validation
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
validation: function(value, options) {
if (value == '' || value == '-' || value == '+') {
return false;
}
var regExp = /^[\-\+]?\d*$/;
- 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
Function destroy
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Spry.Widget.ValidationSelect.prototype.destroy = function() {
if (this.event_handlers)
for (var i=0; i<this.event_handlers.length; i++) {
Spry.Widget.Utils.removeEventListener(this.event_handlers[i][0], this.event_handlers[i][1], this.event_handlers[i][2], false);
}
- 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
Function getRowNumber
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.DataSet.prototype.getRowNumber = function(row, unfiltered)
{
if (row)
{
var rows = this.getData(unfiltered);
- 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
Function getAttribute
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Spry.Utils.getAttribute = function(ele, name)
{
ele = Spry.$(ele);
if (!ele || !name)
return null;
- 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
Function id
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
'id': function(ctx) {
assert(this.args.length == 1);
var e = this.args[0].evaluate(ctx);
var ret = [];
var ids;
- 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
Function keyboardAction
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
keyboardAction: function(event) {
var keycode = event.keyCode;
var escapeKey;
if (event.DOM_VK_ESCAPE) { // mozilla
- 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
Function loadDataIntoDataSet
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.XMLDataSet.prototype.loadDataIntoDataSet = function(rawDataDoc)
{
var rs = null;
var mainXPath = Spry.Data.Region.processDataRefString(null, this.xpath, this.dataSetsForDataRefStrings);
var subPaths = this.subPaths;
- 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
Function setRowAttrClickHandler
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.Region.setRowAttrClickHandler = function(node, dsName, rowAttr, funcName)
{
if (dsName)
{
var ds = Spry.Data.getDataSetByName(dsName);
- 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"