BallStateCBER/datacenter-plugin-cakephp3

View on GitHub

Showing 1,787 of 1,787 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

jQuery.Event = function( src, props ) {
    // Allow instantiation without the 'new' keyword
    if ( !(this instanceof jQuery.Event) ) {
        return new jQuery.Event( src, props );
    }
Severity: Major
Found in webroot/js/jquery-1.7.1.js and 1 other location - About 1 day to fix
webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js on lines 5361..5392

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 244.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function parse has 256 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        parse: function (str, callback, additionalData) {
            var root, line, lines, error = null, globalVars, modifyVars, preText = "";

            i = j = currentPos = furthest = 0;

Severity: Major
Found in webroot/js/less-1.7.3.js - About 1 day to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                            if ($ct < 0 || $cr < 0 || $cb < 0 || $cl < 0 ) {
                                // use the background color if present
                                if (!empty($this->image_background_color)) {
                                    list($red, $green, $blue) = $this->getcolors($this->image_background_color);
                                    $fill = imagecolorallocate($tmp, $red, $green, $blue);
    webroot/js/tiny_mce/plugins/phpimage/classes/class.upload.php on lines 3415..3428

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 285.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                            if ($ct < 0 || $cr < 0 || $cb < 0 || $cl < 0 ) {
                                // use the background color if present
                                if (!empty($this->image_background_color)) {
                                    list($red, $green, $blue) = $this->getcolors($this->image_background_color);
                                    $fill = imagecolorallocate($tmp, $red, $green, $blue);
    webroot/js/tiny_mce/plugins/phpimage/classes/class.upload.php on lines 3620..3633

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 285.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function ajax has 242 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        ajax: function( url, options ) {
    
            // If url is an object, simulate pre-1.5 signature
            if ( typeof url === "object" ) {
                options = url;
    Severity: Major
    Found in webroot/js/jquery-1.7.1.js - About 1 day to fix

      Function ajax has 240 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          ajax: function( url, options ) {
      
              // If url is an object, simulate pre-1.5 signature
              if ( typeof url === "object" ) {
                  options = url;
      Severity: Major
      Found in webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js - About 1 day to fix

        Function _addEvents has 235 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _addEvents : function() {
                    // 'focus', 'blur', 'dblclick', 'beforedeactivate', submit, reset
                    var t = this, i, s = t.settings, lo = {
                        mouseup : 'onMouseUp',
                        mousedown : 'onMouseDown',
        Severity: Major
        Found in webroot/js/tiny_mce/tiny_mce_src.js - About 1 day to fix

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

              wrapAll: function( html ) {
                  if ( jQuery.isFunction( html ) ) {
                      return this.each(function(i) {
                          jQuery(this).wrapAll( html.call(this, i) );
                      });
          Severity: Major
          Found in webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js and 1 other location - About 1 day to fix
          webroot/js/jquery-1.7.1.js on lines 5695..5722

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 221.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

              wrapAll: function( html ) {
                  if ( jQuery.isFunction( html ) ) {
                      return this.each(function(i) {
                          jQuery(this).wrapAll( html.call(this, i) );
                      });
          Severity: Major
          Found in webroot/js/jquery-1.7.1.js and 1 other location - About 1 day to fix
          webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js on lines 6729..6756

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 221.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

              if ( !!document.getElementById( id ) ) {
                  Expr.find.ID = function(match, context, isXML){
                      if ( typeof context.getElementById !== "undefined" && !isXML ) {
                          var m = context.getElementById(match[1]);
                          return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
          Severity: Major
          Found in webroot/js/tiny_mce/tiny_mce_src.js and 1 other location - About 1 day to fix
          webroot/js/jquery-1.7.1.js on lines 4916..4934

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 215.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

              if ( document.getElementById( id ) ) {
                  Expr.find.ID = function( match, context, isXML ) {
                      if ( typeof context.getElementById !== "undefined" && !isXML ) {
                          var m = context.getElementById(match[1]);
          
          
          Severity: Major
          Found in webroot/js/jquery-1.7.1.js and 1 other location - About 1 day to fix
          webroot/js/tiny_mce/tiny_mce_src.js on lines 4209..4221

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 215.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              setFilters: {
                  first: function(elem, i){
                      return i === 0;
                  },
                  last: function(elem, i, match, array){
          Severity: Major
          Found in webroot/js/tiny_mce/tiny_mce_src.js and 1 other location - About 1 day to fix
          webroot/js/jquery-1.7.1.js on lines 4566..4598

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 212.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              setFilters: {
                  first: function( elem, i ) {
                      return i === 0;
                  },
          
          
          Severity: Major
          Found in webroot/js/jquery-1.7.1.js and 1 other location - About 1 day to fix
          webroot/js/tiny_mce/tiny_mce_src.js on lines 3977..4002

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 212.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Function setupIframe has 218 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  setupIframe : function() {
                      var t = this, s = t.settings, e = DOM.get(t.id), d = t.getDoc(), h, b;
          
                      // Setup iframe body
                      if (!isIE || !tinymce.relaxedDomain) {
          Severity: Major
          Found in webroot/js/tiny_mce/tiny_mce_src.js - About 1 day to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if(shift.top = (vertical === SHIFT && !!adjust.top)) {
                        if(newCorner.y === CENTER) {
                            css[MARGIN+'-top'] = shift.y = offset[MARGIN+'-top'] - adjust.top;
                        }
                        else {
            Severity: Major
            Found in webroot/js/jquery.qtip.js and 1 other location - About 1 day to fix
            webroot/js/jquery.qtip.js on lines 2424..2439

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 204.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if(shift.left = (horizontal === SHIFT && !!adjust.left)) {
                        if(newCorner.x === CENTER) {
                            css[MARGIN+'-left'] = shift.x = offset[MARGIN+'-left'] - adjust.left;
                        }
                        else {
            Severity: Major
            Found in webroot/js/jquery.qtip.js and 1 other location - About 1 day to fix
            webroot/js/jquery.qtip.js on lines 2440..2455

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 204.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function _create has 203 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _create: function() {
                    // Some browsers only repeat keydown events, not keypress events,
                    // so we use the suppressKeyPress flag to determine if we've already
                    // handled the keydown event. #7269
                    // Unfortunately the code for & in keypress is the same as the up arrow,
            Severity: Major
            Found in webroot/jquery-ui-1.11.3.custom/jquery-ui.js - About 1 day to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                              !type && Sizzle.attr ?
                              result != null :
                              type === "=" ?
                              value === check :
                              type === "*=" ?
              Severity: Major
              Found in webroot/js/jquery-1.7.1.js and 1 other location - About 1 day to fix
              webroot/js/tiny_mce/tiny_mce_src.js on lines 4087..4105

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 197.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                          return result == null ?
                              type === "!=" :
                              type === "=" ?
                              value === check :
                              type === "*=" ?
              Severity: Major
              Found in webroot/js/tiny_mce/tiny_mce_src.js and 1 other location - About 1 day to fix
              webroot/js/jquery-1.7.1.js on lines 4719..4737

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 197.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function insertTable has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
              Open

              function insertTable() {
                  var formObj = document.forms[0];
                  var inst = tinyMCEPopup.editor, dom = inst.dom;
                  var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
                  var html = '', capEl, elm;
              Severity: Minor
              Found in webroot/js/tiny_mce/plugins/table/js/table.js - About 1 day 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