BallStateCBER/datacenter-plugin-cakephp3

View on GitHub

Showing 955 of 1,787 total issues

Avoid too many return statements within this function.
Open

                            return false;
Severity: Major
Found in webroot/js/tiny_mce/tiny_mce_src.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return ( context || rootjQuery ).find( selector );
    Severity: Major
    Found in webroot/jquery-ui-1.11.3.custom/external/jquery/jquery.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return false;
      Severity: Major
      Found in webroot/jquery-ui-1.11.3.custom/jquery-ui.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return true;
        Severity: Major
        Found in webroot/jquery-ui-1.11.3.custom/jquery-ui.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return;
          Severity: Major
          Found in webroot/jquery-ui-1.11.3.custom/jquery-ui.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return false;
            Severity: Major
            Found in webroot/jquery-ui-1.11.3.custom/jquery-ui.js - About 30 mins to fix

              Function processTagList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  processTagList: function (data) {
                      for (var i = 0; i < data.length; i++) {
                          var tagId = data[i].id;
                          var tagName = data[i].name;
                          var children = data[i].children;
              Severity: Minor
              Found in webroot/js/tag_manager.js - About 25 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 computeColor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function computeColor(e) {
                  var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB;
              
                  x = e.offsetX ? e.offsetX : (e.target ? e.clientX - e.target.x : 0);
                  y = e.offsetY ? e.offsetY : (e.target ? e.clientY - e.target.y : 0);
              Severity: Minor
              Found in webroot/js/tiny_mce/themes/advanced/js/color_picker.js - About 25 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 parseWindowOpen has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function parseWindowOpen(onclick) {
                  var formObj = document.forms[0];
              
                  // Preprocess center code
                  if (onclick.indexOf('return false;') != -1) {
              Severity: Minor
              Found in webroot/js/tiny_mce/plugins/advlink/js/advlink.js - About 25 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 toggleSame has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function toggleSame(ce, pre) {
                  var el = document.forms[0].elements, i;
              
                  if (ce.checked) {
                      el[pre + "_top"].disabled = false;
              Severity: Minor
              Found in webroot/js/tiny_mce/plugins/style/js/props.js - About 25 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 insert has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  insert : function(file, title) {
                      var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
              
                      if (f.src.value === '') {
                          if (ed.selection.getNode().nodeName == 'IMG') {
              Severity: Minor
              Found in webroot/js/tiny_mce/plugins/advimage/js/image.js - About 25 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 insert has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  insert : function(file, title) {
                      var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
              
                      if (f.src.value === '') {
                          if (ed.selection.getNode().nodeName == 'IMG') {
              Severity: Minor
              Found in webroot/js/tiny_mce/plugins/phpimage/js/image.js - About 25 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 changedColor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function changedColor() {
                  var formObj = document.forms[0];
                  var st = dom.parseStyle(formObj.style.value);
              
                  st['background-color'] = formObj.bgcolor.value;
              Severity: Minor
              Found in webroot/js/tiny_mce/plugins/table/js/table.js - About 25 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 showDisabledControls has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function showDisabledControls() {
                  var f = document.forms, i, a;
              
                  for (i=0; i<f.length; i++) {
                      for (a=0; a<f[i].elements.length; a++) {
              Severity: Minor
              Found in webroot/js/tiny_mce/plugins/style/js/props.js - About 25 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 inArray has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  inArray : function(a, v) {
                      var i, l;
              
                      if (a) {
                          for (i = 0, l = a.length; i < l; i++) {
              Severity: Minor
              Found in webroot/js/tiny_mce/tiny_mce_src.js - About 25 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