jkuchar/MultipleFileUpload

View on GitHub

Showing 205 of 353 total issues

Avoid deeply nested control flow statements.
Open

                                    if ($('#' + file.id)) {
                                        swfuploadify.queueData.queueSize   -= file.size;
                                        swfuploadify.queueData.queueLength -= 1;
                                        delete swfuploadify.queueData.files[file.id];
                                        $('#' + file.id).fadeOut(500, function() {
Severity: Major
Found in public/uploadify/js/jquery.uploadify-3.1.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if (o && typeof o.SetVariable != UNDEF) { 
                                cbObj.success = true;
                                cbObj.ref = o;
                            }
    Severity: Major
    Found in public/uploadify/js/swfobject.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
                                  ac.appendChild(c[i].cloneNode(true));
                              }
      Severity: Major
      Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

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

                function _drawToCanvas(img, canvas, x, y, w, h) {
        Severity: Minor
        Found in public/plupload/js/moxie.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                                      o.setAttribute("class", attObj[m]);
                                  }
                                  else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
                                      o.setAttribute(m, attObj[m]);
          Severity: Major
          Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
                                        setVisibility(id, true);
                                        if (cb) {
                                            cbObj.success = true;
                                            cbObj.ref = getObjectById(id);
            Severity: Major
            Found in public/uploadify/js/swfobject (2).js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                                          o.setAttribute("class", attObj[m]);
                                      }
                                      else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
                                          o.setAttribute(m, attObj[m]);
              Severity: Major
              Found in public/uploadify/js/swfobject.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
                                            ac.appendChild(c[i].cloneNode(true));
                                        }
                Severity: Major
                Found in public/uploadify/js/swfobject.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if (i.toLowerCase() == "data") {
                                              parObj.movie = attObj[i];
                                          }
                                          else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
                                              att += ' class="' + attObj[i] + '"';
                  Severity: Major
                  Found in public/uploadify/js/swfobject.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (callback(obj[key], key) === false) {
                                                return;
                                            }
                    Severity: Major
                    Found in public/plupload/js/moxie.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      if (typeof(q) === OBJ_TYPE && q.length > 0) {
                                                          if (q.length == 2) {
                                                              if (typeof(q[1]) == FUNC_TYPE) {
                                                                  // assign modified match
                                                                  result[q[0]] = q[1].call(this, match);
                      Severity: Major
                      Found in public/plupload/js/moxie.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if (/^(\d|[1-9]\d+)$/.test(value)) { // integer (make sure doesn't start with zero)
                                                            value = parseInt(value, 10);
                                                        } else if (/^\d*\.\d+$/.test(value)) { // double
                                                            value = parseFloat(value);
                                                        }
                        Severity: Major
                        Found in public/plupload/js/moxie.js - About 45 mins to fix

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

                              function Runtime(options, type, caps, modeCaps, preferredMode) {
                          Severity: Minor
                          Found in public/plupload/js/moxie.js - About 35 mins to fix

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

                                        open: function(method, url, async, user, password) {
                            Severity: Minor
                            Found in public/plupload/js/moxie.js - About 35 mins to fix

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

                                  private function processFiles(array $files, array $names = [])
                                  {
                                      foreach ($files as $name => $controlValue) {
                                          $names[] = $name;
                              
                              
                              Severity: Minor
                              Found in MultipleFileUpload/UI/HTML4SingleUpload/Controller.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 initSettings has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  SWFUpload.prototype.initSettings = (function (oldInitSettings) {
                                      return function (userSettings) {
                                          if (typeof(oldInitSettings) === "function") {
                                              oldInitSettings.call(this, userSettings);
                                          }
                              Severity: Minor
                              Found in public/swfupload/js/swfupload.proxy.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 extendFile has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  SWFUpload.speed.extendFile = function (file, trackingList) {
                                      var tracking;
                                      
                                      if (!file) {
                                          return file;
                              Severity: Minor
                              Found in public/swfupload/js/swfupload.speed.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 initSettings has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  SWFUpload.prototype.initSettings = (function (oldInitSettings) {
                                      return function (userSettings) {
                                          if (typeof(oldInitSettings) === "function") {
                                              oldInitSettings.call(this, userSettings);
                                          }
                              Severity: Minor
                              Found in public/swfupload/js/swfupload.speed.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

                              Avoid too many return statements within this function.
                              Open

                                          return Math.round(size / 1024) + " " + plupload.translate('kb');
                              Severity: Major
                              Found in public/plupload/js/plupload.dev.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return size + " " + plupload.translate('b');
                                Severity: Major
                                Found in public/plupload/js/plupload.dev.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language