lancew/DojoList

View on GitHub

Showing 216 of 1,940 total issues

Function replace has a Cognitive Complexity of 9 (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)) {
Severity: Minor
Found in js/prototype/prototype-1.6.0.3.js - About 55 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 getStyle has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  getStyle: function(element, style) {
    element = $(element);
    style = style == 'float' ? 'cssFloat' : style.camelize();
    var value = element.style[style];
    if (!value || value == 'auto') {
Severity: Minor
Found in js/prototype/prototype-1.6.0.3.js - About 55 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 Admin_importjwm has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function Admin_importjwm() 
{

    set_time_limit();
    $ch = curl_init("http://judoworldmap.com/");
Severity: Minor
Found in controllers/admin.php - About 55 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 flash_now has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function flash_now($name = null, $value = null)
{
  static $messages = null;
  if(is_null($messages))
  {
Severity: Minor
Found in lib/limonade.php - About 55 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 assert_header has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
{
  test_run_assertion();
  # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
  $headers = preg_split("/^\s*$/ms", $response);
Severity: Minor
Found in lib/limonade/assertions.php - About 55 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 route has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function route()
{
  static $routes = array();
  $nargs = func_num_args();
  if( $nargs > 0)
Severity: Minor
Found in lib/limonade.php - About 55 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 addImageOverlay has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

Mapstraction.prototype.addImageOverlay = function(id, src, opacity, west, south, east, north) {
Severity: Major
Found in js/mapstraction.js - About 50 mins to fix

    Function updateContent has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

      updateContent: function(responseText) {
        var receiver = this.container[this.success() ? 'success' : 'failure'],
            options = this.options;
    
        if (!options.evalScripts) responseText = responseText.stripScripts();
    Severity: Minor
    Found in js/prototype/prototype-1.6.0.3.js - About 45 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 deeply nested control flow statements.
    Open

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

      Function attr has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

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

        Avoid deeply nested control flow statements.
        Open

                if (value[1]) return parseFloat(value[1]) / 100;
        Severity: Major
        Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      for (var i = 0, node; node = nodes[i]; i++)
                        if (Element.descendantOf(targetNode, node)) return [targetNode];
          Severity: Major
          Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                  if (element.offsetParent == document.body)
                    if (Element.getStyle(element, 'position') == 'absolute') break;
            Severity: Major
            Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                    if(element.tagName.toUpperCase() == 'IMG' && element.width) {
                      element.width++; element.width--;
                    } else try {
                      var n = document.createTextNode(' ');
                      element.appendChild(n);
              Severity: Major
              Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (showCallback) showCallback(this.markers[m]);
                                        else this.markers[m].show();
                Severity: Major
                Found in js/mapstraction.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              if (node.nodeIndex == indices[j]) results.push(node);
                  Severity: Major
                  Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (hideCallback) hideCallback(this.markers[m]);
                                            else this.markers[m].hide();
                    Severity: Major
                    Found in js/mapstraction.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                } else if (combinator == 'adjacent') {
                                  for (var i = 0, node; node = nodes[i]; i++)
                                    if (Selector.handlers.previousElementSibling(targetNode) == node)
                                      return [targetNode];
                                } else nodes = h[combinator](nodes);
                      Severity: Major
                      Found in js/prototype/prototype-1.6.0.3.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if (! this.applyFilter(this.markers[m], this.filters[f])) {
                                                    vis = false;
                                                }
                        Severity: Major
                        Found in js/mapstraction.js - About 45 mins to fix

                          Function debug has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function debug($var, $output_as_html = true)
                          { 
                            if ( is_null($var) ) { return '<span class="null-value">[NULL]</span>'; };
                            $out = '';
                            switch ($var) 
                          Severity: Minor
                          Found in lib/limonade.php - About 45 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

                          Severity
                          Category
                          Status
                          Source
                          Language