lancew/DojoList

View on GitHub

Showing 388 of 1,940 total issues

Function pseudo has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    pseudo: function(nodes, name, value, root, combinator) {
Severity: Minor
Found in js/prototype/prototype-1.6.0.3.js - About 35 mins to fix

    Function addTileLayer has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    Mapstraction.prototype.addTileLayer = function(tile_url, opacity, copyright_text, min_zoom, max_zoom) {
    Severity: Minor
    Found in js/mapstraction.js - About 35 mins to fix

      Method recaptcha_check_answer has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function recaptcha_check_answer($privkey, $remoteip, $challenge, $response, $extra_params = array())
      Severity: Minor
      Found in lib/recaptchalib.php - About 35 mins to fix

        Method test_request has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function test_request($url, $method="GET", $include_header=false, $post_data=array(), $http_header=array()) {
        Severity: Minor
        Found in lib/limonade/tests.php - About 35 mins to fix

          Function request has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

            request: function(form, options) {
              form = $(form), options = Object.clone(options || { });
          
              var params = options.parameters, action = form.readAttribute('action') || '';
              if (action.blank()) action = window.location.href;
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 update has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

            Element.Methods.update = function(element, content) {
              element = $(element);
          
              if (content && content.toElement) content = content.toElement();
              if (Object.isElement(content)) return element.update().insert(content);
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 attr has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              attr: function(nodes, root, attr, value, operator, combinator) {
                if (!nodes) nodes = root.getElementsByTagName("*");
                if (nodes && combinator) nodes = this[combinator](nodes);
                var handler = Selector.operators[operator], results = [];
                for (var i = 0, node; node = nodes[i]; i++) {
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 toJSON has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

            toJSON: function(object) {
              var type = typeof object;
              switch (type) {
                case 'undefined':
                case 'function':
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 indexOf has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
            i || (i = 0);
            var length = this.length;
            if (i < 0) i = length + i;
            for (; i < length; i++)
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 child has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              child: function(nodes) {
                var h = Selector.handlers;
                for (var i = 0, results = [], node; node = nodes[i]; i++) {
                  for (var j = 0, child; child = node.childNodes[j]; j++)
                    if (child.nodeType == 1 && child.tagName != '!') results.push(child);
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 lastIndexOf has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
            i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
            var n = this.slice(0, i).reverse().indexOf(item);
            return (n < 0) ? n : i - n - 1;
          };
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 byClassName has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              byClassName: function(nodes, root, className) {
                if (!nodes) nodes = Selector.handlers.descendant([root]);
                var needle = ' ' + className + ' ';
                for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
                  nodeClassName = node.className;
          Severity: Minor
          Found in js/prototype/prototype-1.6.0.3.js - About 35 mins 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 file_mime_content_type has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          function file_mime_content_type($filename)
          {
            $ext = file_extension($filename); /* strtolower isn't necessary */
            if($mime = mime_type($ext)) return $mime;
            elseif (function_exists('finfo_open'))
          Severity: Minor
          Found in lib/limonade.php - About 35 mins 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 params has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          function params($name_or_array_or_null = null, $value = null)
          {
            static $params = array();
            $args = func_get_args();
          
          
          Severity: Minor
          Found in lib/limonade.php - About 35 mins 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 file_list_dir has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          function file_list_dir($dir)
          {
            $files = array();
            if ($handle = opendir($dir))
            {
          Severity: Minor
          Found in lib/limonade.php - About 35 mins 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 test_case_all_func has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          function test_case_all_func()
          {
             $functions = get_defined_functions();
             $functions = $functions['user'];
             $tests = array();
          Severity: Minor
          Found in lib/limonade/tests.php - About 35 mins 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

          Avoid too many return statements within this function.
          Open

                      return new BoundingBox (se.Latitude/60, nw.Longitude/60,
                          nw.Latitude/60, se.Longitude/60 );
          Severity: Major
          Found in js/mapstraction.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                      if (node == targetNode) return [targetNode];
            Severity: Major
            Found in js/prototype/prototype-1.6.0.3.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return map.getMapScale();
              Severity: Major
              Found in js/mapstraction.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return [];
                Severity: Major
                Found in js/prototype/prototype-1.6.0.3.js - About 30 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language