GuilhermeStracini/TCC-SENAC

View on GitHub

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') {
Severity: Minor
Found in Src/scripts/prototype.js - About 1 hr to fix

    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,
    Severity: Minor
    Found in Src/scripts/effects.js - About 1 hr to fix

      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();
      Severity: Minor
      Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

      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 :
      Severity: Minor
      Found in Src/scripts/prototype.js - About 1 hr to fix

      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;
      
      
      Severity: Minor
      Found in Src/scripts/prototype.js - About 1 hr to fix

      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;
      
      
      Severity: Minor
      Found in Src/scripts/sprydata.js - About 1 hr to fix

      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 = "";
      Severity: Minor
      Found in Src/scripts/sprydata.js - About 1 hr to fix

      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 = {};
      
      
      Severity: Minor
      Found in Src/scripts/sprydata.js - About 1 hr to fix

      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;
      
      
      Severity: Minor
      Found in Src/scripts/sprydata.js - About 1 hr to fix

      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);
      Severity: Minor
      Found in Src/scripts/prototype.js - About 1 hr to fix

        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);
        Severity: Minor
        Found in Src/scripts/prototype.js - About 1 hr to fix

          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 = [];
          Severity: Minor
          Found in Src/scripts/spryvalidationtextfield.js - About 1 hr to fix

            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];
            Severity: Minor
            Found in Src/scripts/xpath.js - About 1 hr to fix

              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;
              
              
              Severity: Minor
              Found in Src/scripts/sprydata.js - About 1 hr to fix

                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.
                Severity: Minor
                Found in Src/scripts/sprydata.js - About 1 hr to fix

                  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 "";
                  
                  
                  Severity: Minor
                  Found in Src/scripts/sprydata.js - About 1 hr to fix

                    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)) {
                    Severity: Minor
                    Found in Src/scripts/prototype.js - About 1 hr to fix

                      Function xpathParseInit has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function xpathParseInit() {
                        if (xpathRules.length) {
                          return;
                        }
                      
                      
                      Severity: Minor
                      Found in Src/scripts/xpath.js - About 1 hr to fix

                      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
                      Severity: Minor
                      Found in Src/scripts/spryvalidationselect.js - About 1 hr to fix

                      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
                          {
                      Severity: Minor
                      Found in Src/scripts/sprydata.js - About 1 hr to fix

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language