owncloud/core

View on GitHub
apps/files_external/js/rollingqueue.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function RollingQueue has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var RollingQueue = function (functionList, queueWindow, callback) {
    this.queueWindow = queueWindow || 1;
    this.functionList = functionList;
    this.callback = callback;
    this.counter = 0;
Severity: Major
Found in apps/files_external/js/rollingqueue.js - About 2 hrs to fix

    Function launchNext has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        this.launchNext = function() {
            var currentCounter = this.counter++;
            if (currentCounter in this.functionList) {
                var funcData = this.functionList[currentCounter];
                if ($.isFunction(funcData.funcName)) {
    Severity: Minor
    Found in apps/files_external/js/rollingqueue.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

                              if ($.isFunction(this.callback)) {
                                  $.when.apply($, this.deferredsList)
                                      .always($.proxy(function(){
                                          this.callback();
                                      }, this)
      Severity: Major
      Found in apps/files_external/js/rollingqueue.js - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status