Showing 390 of 605 total issues
Function Str
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Str(key, holder, stack) {
var value = holder[key],
type = typeof value;
if (Type(value) === OBJECT_TYPE && typeof value.toJSON === 'function') {
Function Shrink
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Effect.Shrink = function(element) {
element = $(element);
var options = Object.extend({
direction: 'center',
moveTransition: Effect.Transitions.sinoidal,
Function moveTo
has a Cognitive Complexity of 15 (exceeds 5 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();
- 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 request
has a Cognitive Complexity of 15 (exceeds 5 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 :
- 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 setOpacity
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Element.Methods.setOpacity = function(element, value) {
element = $(element);
element.style.opacity = (value == 1 || value === '') ? '' :
(value < 0.00001) ? 0 : 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
Function loadData
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.HTTPSourceDataSet.prototype.loadData = function()
{
if (!this.url)
return;
- 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 serializeObject
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Spry.Utils.serializeObject = function(obj)
{
// Create a JSON representation of a given object.
var str = "";
- 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 strToDataSetsArray
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.Region.strToDataSetsArray = function(str, returnRegionNames)
{
var dataSetsArr = new Array;
var foundHash = {};
- 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 getRecordSetFromXMLDoc
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Spry.Data.XMLDataSet.getRecordSetFromXMLDoc = function(xmlDoc, path, suppressColumns, entityEncodeStrings)
{
if (!xmlDoc || !path)
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 _createResponder
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _createResponder(element, eventName, handler) {
var registry = Element.retrieve(element, 'prototype_event_registry');
if (Object.isUndefined(registry)) {
CACHE.push(element);
Function getPixelValue
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getPixelValue(value, property, context) {
var element = null;
if (Object.isElement(value)) {
element = value;
value = element.getStyle(property);
Function compileDatePattern
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Widget.ValidationTextField.prototype.compileDatePattern = function ()
{
var dateValidationPatternString = "";
var groupPatterns = [];
var fullGroupPatterns = [];
Function xpathReduce
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xpathReduce(stack, ahead) {
var cand = null;
if (stack.length > 0) {
var top = stack[stack.length-1];
Function createObjectForNode
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Data.XMLDataSet.createObjectForNode = function(node, encodeText, encodeCData)
{
if (!node)
return null;
Function sort
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Data.DataSet.prototype.sort = function(columnNames, sortOrder)
{
// columnNames can be either the name of a column to
// sort on, or an array of column names, but it can't be
// null/undefined.
Function processDataRefString
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Spry.Data.Region.processDataRefString = function(processingContext, regionStr, dataSetsToUse, isJSExpr)
{
if (!regionStr)
return "";
Function _begin
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
_begin: function() {
if (this._prepared) return;
var element = this.element;
if (isDisplayed(element)) {
Function xpathParseInit
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function xpathParseInit() {
if (xpathRules.length) {
return;
}
- 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 validate
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Spry.Widget.ValidationSelect.prototype.validate = function() {
this.reset();
// check isRequired
if (this.isRequired) {
// there are no options, or no option has been selected
- 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 createXMLHttpRequest
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Spry.Utils.createXMLHttpRequest = function()
{
var req = null;
try
{
- 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"