zammad/zammad

View on GitHub
public/assets/form/form.js

Summary

Maintainability
D
1 day
Test Coverage

File form.js has 523 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function ($) {

/*
*
*  provides feedback form for zammad
Severity: Major
Found in public/assets/form/form.js - About 1 day to fix

    Function init has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Plugin.prototype.init = function () {
        var _this = this,
          params = {}
    
        _this.log('debug', 'init', this._src)
    Severity: Major
    Found in public/assets/form/form.js - About 2 hrs to fix

      Function render has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Plugin.prototype.render = function(e) {
          var _this = this
          _this.closeModal()
          _this.modalOpenTime = new Date()
          _this.log('debug', 'modalOpenTime:', _this.modalOpenTime)
      Severity: Major
      Found in public/assets/form/form.js - About 2 hrs to fix

        Function submit has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Plugin.prototype.submit = function() {
            var _this = this
        
            // check min modal open time
            if (_this.modalOpenTime) {
        Severity: Minor
        Found in public/assets/form/form.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status