burningpony/phd_checker

View on GitHub

Showing 50 of 103 total issues

Function _formatTime has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    _formatTime: function(time, format, ampm) {
        if (ampm == undefined) ampm = this._defaults.ampm;
        time = time || { hour: this.hour, minute: this.minute, second: this.second, ampm: this.ampm };
        var tmptime = format || this._defaults.timeFormat.toString();

Severity: Minor
Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

    Function quit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            window.quit = function(kwargs) {
                // make sure whatever is open is now closed
                $.modal.close();
                if (kwargs && kwargs.timeout) {
                    //MAKE IT SO WHEN IT TIMES OUT IT CHECKS WHAT ROUND IT IS ON AND DOES THE RIghT ThinG
    Severity: Minor
    Found in app/assets/javascripts/phd.js - About 1 hr to fix

      Function _parseTime has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _parseTime: function(timeString, withDate) {
              var regstr = this._defaults.timeFormat.toString()
                      .replace(/h{1,2}/ig, '(\\d?\\d)')
                      .replace(/m{1,2}/ig, '(\\d?\\d)')
                      .replace(/s{1,2}/ig, '(\\d?\\d)')
      Severity: Minor
      Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

        Function fancybox has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            $.fn.fancybox = function(options) {
                if (!$(this).length) {
                    return this;
                }
        
        Severity: Minor
        Found in public/fancybox/jquery.fancybox-1.3.4.js - About 1 hr to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (h == 0) tmph = 12 +'a';
                                  else if (h < 12) tmph += 'a';
                                  else tmph += 'p';
          Severity: Major
          Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                            if (aph == 12) h = 0;
                                            else h = aph;
            Severity: Major
            Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          } else if (aph == 12) h = 12;
                                          else h = aph + 12;
              Severity: Major
              Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 45 mins to fix

                Consider simplifying this complex logical expression.
                Open

                        if (force || this.hour != hour || this.minute != minute || this.second != second || (this.ampm.length > 0 && this.ampm != ampm))
                            hasChanged = true;
                Severity: Major
                Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax)) {
                              hour = defaults.hourMin;
                              minute = defaults.minuteMin;
                              second = defaults.secondMin;
                          }
                  Severity: Major
                  Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                                        } else if ((e.keyCode == 37 || e.keyCode == 39) && currentOpts.enableKeyboardNav && e.target.tagName !== 'INPUT' && e.target.tagName !== 'TEXTAREA' && e.target.tagName !== 'SELECT') {
                                            e.preventDefault();
                                            $.fancybox[ e.keyCode == 37 ? 'prev' : 'next']();
                                        }
                    Severity: Major
                    Found in public/fancybox/jquery.fancybox-1.3.4.js - About 40 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language