webcol/Calima

View on GitHub
public_/plantillas/inspinia/js/plugins/morris/morris.js

Summary

Maintainability
F
1 mo
Test Coverage

File morris.js has 1747 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* @license
morris.js v0.5.0
Copyright 2014 Olly Smith All rights reserved.
Licensed under the BSD-2-Clause License.
*/
Severity: Major
Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 4 days to fix

    Function Grid has 493 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Morris.Grid = (function(_super) {
        __extends(Grid, _super);
    
        function Grid(options) {
          this.resizeHandler = __bind(this.resizeHandler, this);
    Severity: Major
    Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 2 days to fix

      Function Line has 388 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        Morris.Line = (function(_super) {
          __extends(Line, _super);
      
          function Line(options) {
            this.hilight = __bind(this.hilight, this);
      Severity: Major
      Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 day to fix

        Function Bar has 229 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Morris.Bar = (function(_super) {
            __extends(Bar, _super);
        
            function Bar(options) {
              this.onHoverOut = __bind(this.onHoverOut, this);
        Severity: Major
        Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 day to fix

          Function Donut has 153 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            Morris.Donut = (function(_super) {
              __extends(Donut, _super);
          
              Donut.prototype.defaults = {
                colors: ['#0B62A4', '#3980B5', '#679DC6', '#95BBD7', '#B0CCE1', '#095791', '#095085', '#083E67', '#052C48', '#042135'],
          Severity: Major
          Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 6 hrs to fix

            Function setData has 140 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Grid.prototype.setData = function(data, redraw) {
                  var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval, _ref;
                  if (redraw == null) {
                    redraw = true;
                  }
            Severity: Major
            Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 5 hrs to fix

              Function Grid has 89 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function Grid(options) {
                    this.resizeHandler = __bind(this.resizeHandler, this);
                    var _this = this;
                    if (typeof options.element === 'string') {
                      this.el = $(document.getElementById(options.element));
              Severity: Major
              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 3 hrs to fix

                Function Area has 87 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  Morris.Area = (function(_super) {
                    var areaDefaults;
                
                    __extends(Area, _super);
                
                
                Severity: Major
                Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 3 hrs to fix

                  Function DonutSegment has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Morris.DonutSegment = (function(_super) {
                      __extends(DonutSegment, _super);
                  
                      function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
                        this.cx = cx;
                  Severity: Major
                  Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 3 hrs to fix

                    Function data has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          this.data = (function() {
                            var _i, _len, _results;
                            _results = [];
                            for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) {
                              row = data[index];
                    Severity: Major
                    Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 2 hrs to fix

                      Function parseDate has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        Morris.parseDate = function(date) {
                          var isecs, m, msecs, n, o, offsetmins, p, q, r, ret, secs;
                          if (typeof date === 'number') {
                            return date;
                          }
                      Severity: Major
                      Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 2 hrs to fix

                        Function Hover has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          Morris.Hover = (function() {
                            Hover.defaults = {
                              "class": 'morris-hover morris-default-style'
                            };
                        
                        
                        Severity: Major
                        Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 2 hrs to fix

                          Function drawSeries has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              Bar.prototype.drawSeries = function() {
                                var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos;
                                groupWidth = this.width / this.options.data.length;
                                numBars = this.options.stacked ? 1 : this.options.ykeys.length;
                                barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
                          Severity: Major
                          Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 2 hrs to fix

                            Function drawXAxis has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                Line.prototype.drawXAxis = function() {
                                  var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results,
                                    _this = this;
                                  ypos = this.bottom + this.options.padding / 2;
                                  prevLabelMargin = null;
                            Severity: Major
                            Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 2 hrs to fix

                              Function redraw has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  Donut.prototype.redraw = function() {
                                    var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
                                    this.raphael.clear();
                                    cx = this.el.width() / 2;
                                    cy = this.el.height() / 2;
                              Severity: Minor
                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                Function _calc has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    Grid.prototype._calc = function() {
                                      var bottomOffsets, gridLine, h, i, w, yLabelWidths, _ref, _ref1;
                                      w = this.el.width();
                                      h = this.el.height();
                                      if (this.elementWidth !== w || this.elementHeight !== h || this.dirty) {
                                Severity: Minor
                                Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                  Function bars has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                        return this.bars = (function() {
                                          var _i, _len, _ref, _results;
                                          _ref = this.data;
                                          _results = [];
                                          for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {
                                  Severity: Minor
                                  Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                    Function autoGridLines has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        Grid.prototype.autoGridLines = function(ymin, ymax, nlines) {
                                          var gmax, gmin, grid, smag, span, step, unit, y, ymag;
                                          span = ymax - ymin;
                                          ymag = Math.floor(Math.log(span) / Math.log(10));
                                          unit = Math.pow(10, ymag);
                                    Severity: Minor
                                    Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                      Function calcPoints has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          Line.prototype.calcPoints = function() {
                                            var row, y, _i, _len, _ref, _results;
                                            _ref = this.data;
                                            _results = [];
                                            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                                      Severity: Minor
                                      Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                        Function createPath has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            Line.createPath = function(coords, smooth, bottom) {
                                              var coord, g, grads, i, ix, lg, path, prevCoord, x1, x2, y1, y2, _i, _len;
                                              path = "";
                                              if (smooth) {
                                                grads = Morris.Line.gradients(coords);
                                        Severity: Minor
                                        Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                          Function labelSeries has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                            Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
                                              var d, d0, ddensity, name, ret, s, spec, t, _i, _len, _ref;
                                              ddensity = 200 * (dmax - dmin) / pxwidth;
                                              d0 = new Date(dmin);
                                              spec = Morris.LABEL_SPECS[specName];
                                          Severity: Minor
                                          Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                            Function DonutSegment has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
                                            Severity: Major
                                            Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                              Function y has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                        ret.y = (function() {
                                                          var _j, _len1, _ref, _results1;
                                                          _ref = this.options.ykeys;
                                                          _results1 = [];
                                                          for (idx = _j = 0, _len1 = _ref.length; _j < _len1; idx = ++_j) {
                                              Severity: Minor
                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

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

                                                    function Donut(options) {
                                                      this.resizeHandler = __bind(this.resizeHandler, this);
                                                      this.select = __bind(this.select, this);
                                                      this.click = __bind(this.click, this);
                                                      var _this = this;
                                                Severity: Minor
                                                Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

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

                                                      Line.prototype.generatePaths = function() {
                                                        var coords, i, r, smooth;
                                                        return this.paths = (function() {
                                                          var _i, _ref, _ref1, _results;
                                                          _results = [];
                                                  Severity: Minor
                                                  Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                                    Function gradients has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        Line.gradients = function(coords) {
                                                          var coord, grad, i, nextCoord, prevCoord, _i, _len, _results;
                                                          grad = function(a, b) {
                                                            return (a.y - b.y) / (a.x - b.x);
                                                          };
                                                    Severity: Minor
                                                    Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

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

                                                          Bar.prototype.drawXAxis = function() {
                                                            var i, label, labelBox, margin, offset, prevAngleMargin, prevLabelMargin, row, textBox, ypos, _i, _ref, _results;
                                                            ypos = this.bottom + (this.options.xAxisLabelTopPadding || this.options.padding / 2);
                                                            prevLabelMargin = null;
                                                            prevAngleMargin = null;
                                                      Severity: Minor
                                                      Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

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

                                                              return this.paths = (function() {
                                                                var _i, _ref, _ref1, _results;
                                                                _results = [];
                                                                for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
                                                                  smooth = typeof this.options.smooth === "boolean" ? this.options.smooth : (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
                                                        Severity: Minor
                                                        Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 1 hr to fix

                                                          Function drawBar has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor, opacity, radiusArray) {
                                                          Severity: Major
                                                          Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 50 mins to fix

                                                            Avoid deeply nested control flow statements.
                                                            Open

                                                                      if (q[7] === '+') {
                                                                        offsetmins = 0 - offsetmins;
                                                                      }
                                                            Severity: Major
                                                            Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 45 mins to fix

                                                              Avoid deeply nested control flow statements.
                                                              Open

                                                                                if (ymax != null) {
                                                                                  ymax = Math.max(yval, ymax);
                                                                                  ymin = Math.min(yval, ymin);
                                                                                } else {
                                                                                  ymax = ymin = yval;
                                                              Severity: Major
                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 45 mins to fix

                                                                Avoid deeply nested control flow statements.
                                                                Open

                                                                        if (r[8] !== 'Z') {
                                                                          offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10);
                                                                          if (r[9] === '+') {
                                                                            offsetmins = 0 - offsetmins;
                                                                          }
                                                                Severity: Major
                                                                Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 45 mins to fix

                                                                  Consider simplifying this complex logical expression.
                                                                  Open

                                                                          if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
                                                                            if (this.options.xLabelAngle !== 0) {
                                                                              margin = 1.25 * this.options.gridTextSize / Math.sin(this.options.xLabelAngle * Math.PI / 180.0);
                                                                              prevAngleMargin = labelBox.x - margin;
                                                                            }
                                                                  Severity: Major
                                                                  Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 40 mins to fix

                                                                    Consider simplifying this complex logical expression.
                                                                    Open

                                                                            if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
                                                                              if (_this.options.xLabelAngle !== 0) {
                                                                                margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
                                                                                prevAngleMargin = labelBox.x - margin;
                                                                              }
                                                                    Severity: Major
                                                                    Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 40 mins to fix

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

                                                                          DonutSegment.prototype.drawDonutSegment = function(path, fillColor, strokeColor, hoverFunction, clickFunction) {
                                                                      Severity: Minor
                                                                      Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 35 mins to fix

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

                                                                            Bar.prototype.roundedRect = function(x, y, w, h, r) {
                                                                        Severity: Minor
                                                                        Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 35 mins to fix

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

                                                                              Donut.prototype.drawEmptyDonutLabel = function(xPos, yPos, color, fontSize, fontWeight) {
                                                                          Severity: Minor
                                                                          Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 35 mins to fix

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

                                                                              Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
                                                                            Severity: Minor
                                                                            Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 35 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                      return new Date(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10)).getTime();
                                                                              Severity: Major
                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                          return parseInt(boundaryOption, 10);
                                                                                Severity: Major
                                                                                Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                          return new Date(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10), isecs, msecs).getTime();
                                                                                  Severity: Major
                                                                                  Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                          return new Date(parseInt(date, 10), 0, 1).getTime();
                                                                                    Severity: Major
                                                                                    Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                      Avoid too many return statements within this function.
                                                                                      Open

                                                                                              return Date.UTC(parseInt(q[1], 10), parseInt(q[2], 10) - 1, parseInt(q[3], 10), parseInt(q[4], 10), parseInt(q[5], 10) + offsetmins);
                                                                                      Severity: Major
                                                                                      Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                        Avoid too many return statements within this function.
                                                                                        Open

                                                                                                return boundaryOption;
                                                                                        Severity: Major
                                                                                        Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                          Avoid too many return statements within this function.
                                                                                          Open

                                                                                                return ret.getTime() + parseInt(p[2], 10) * 604800000;
                                                                                          Severity: Major
                                                                                          Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                            Avoid too many return statements within this function.
                                                                                            Open

                                                                                                    return Date.UTC(parseInt(r[1], 10), parseInt(r[2], 10) - 1, parseInt(r[3], 10), parseInt(r[4], 10), parseInt(r[5], 10) + offsetmins, isecs, msecs);
                                                                                            Severity: Major
                                                                                            Found in public_/plantillas/inspinia/js/plugins/morris/morris.js - About 30 mins to fix

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  "day": {
                                                                                                    span: 86400000,
                                                                                                    start: function(d) {
                                                                                                      return new Date(d.getFullYear(), d.getMonth(), d.getDate());
                                                                                                    },
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 6 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1240..1251

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 160.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  "week": {
                                                                                                    span: 604800000,
                                                                                                    start: function(d) {
                                                                                                      return new Date(d.getFullYear(), d.getMonth(), d.getDate());
                                                                                                    },
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 6 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1252..1263

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 160.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                              Open

                                                                                                  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 2 other locations - About 4 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/chosen/chosen.jquery.js on lines 16..16
                                                                                              public_/plantillas/inspinia/js/plugins/dropzone/dropzone.js on lines 32..32

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 119.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
                                                                                                      y = _ref[j];
                                                                                                      content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n  " + this.options.labels[j] + ":\n  " + (this.yLabelFormat(y)) + "\n</div>";
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 3 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 845..848

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 112.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
                                                                                                      y = _ref[j];
                                                                                                      content += "<div class='morris-hover-point' style='color: " + (this.colorFor(row, j, 'label')) + "'>\n  " + this.options.labels[j] + ":\n  " + (this.yLabelFormat(y)) + "\n</div>";
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 3 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1592..1595

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 112.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
                                                                                                      event = _ref[i];
                                                                                                      color = this.options.eventLineColors[i % this.options.eventLineColors.length];
                                                                                                      _results.push(this.drawEvent(event, color));
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 3 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 525..529

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 106.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
                                                                                                      goal = _ref[i];
                                                                                                      color = this.options.goalLineColors[i % this.options.goalLineColors.length];
                                                                                                      _results.push(this.drawGoal(goal, color));
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 3 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 537..541

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 106.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (this.options.hideHover !== 'always') {
                                                                                                      this.hover = new Morris.Hover({
                                                                                                        parent: this.el
                                                                                                      });
                                                                                                      this.on('hovermove', this.onHoverMove);
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 3 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1396..1403

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 96.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (this.options.hideHover !== 'always') {
                                                                                                      this.hover = new Morris.Hover({
                                                                                                        parent: this.el
                                                                                                      });
                                                                                                      this.on('hovermove', this.onHoverMove);
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 3 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 730..737

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 96.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (this.options.resize) {
                                                                                                      $(window).bind('resize', function(evt) {
                                                                                                        if (_this.timeoutId != null) {
                                                                                                          window.clearTimeout(_this.timeoutId);
                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1662..1669

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 91.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (this.options.resize) {
                                                                                                      $(window).bind('resize', function(evt) {
                                                                                                        if (_this.timeoutId != null) {
                                                                                                          window.clearTimeout(_this.timeoutId);
                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 154..161

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 91.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Line.prototype.pointSizeForSeries = function(index) {
                                                                                                    if (this.options.pointSize instanceof Array) {
                                                                                                      return this.options.pointSize[index % this.options.pointSize.length];
                                                                                                    } else {
                                                                                                      return this.options.pointSize;
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1106..1112

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 86.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Line.prototype.lineWidthForSeries = function(index) {
                                                                                                    if (this.options.lineWidth instanceof Array) {
                                                                                                      return this.options.lineWidth[index % this.options.lineWidth.length];
                                                                                                    } else {
                                                                                                      return this.options.lineWidth;
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1114..1120

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 86.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                              Open

                                                                                                    return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 2 other locations - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 554..554
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1605..1605

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 83.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                              Open

                                                                                                    return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor).attr('text-anchor', 'end');
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 2 other locations - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1087..1087
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1605..1605

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 83.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 3 locations. Consider refactoring.
                                                                                              Open

                                                                                                    return label = this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 2 other locations - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 554..554
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1087..1087

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 83.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Donut.prototype.resizeHandler = function() {
                                                                                                    this.timeoutId = null;
                                                                                                    this.raphael.setSize(this.el.width(), this.el.height());
                                                                                                    return this.redraw();
                                                                                                  };
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 583..587

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 79.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Grid.prototype.resizeHandler = function() {
                                                                                                    this.timeoutId = null;
                                                                                                    this.raphael.setSize(this.el.width(), this.el.height());
                                                                                                    return this.redraw();
                                                                                                  };
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 2 hrs to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1787..1791

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 79.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                      if (q[6] !== 'Z') {
                                                                                                        offsetmins = parseInt(q[8], 10) * 60 + parseInt(q[9], 10);
                                                                                                        if (q[7] === '+') {
                                                                                                          offsetmins = 0 - offsetmins;
                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 637..642

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 74.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                      if (r[8] !== 'Z') {
                                                                                                        offsetmins = parseInt(r[10], 10) * 60 + parseInt(r[11], 10);
                                                                                                        if (r[9] === '+') {
                                                                                                          offsetmins = 0 - offsetmins;
                                                                                                        }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 621..626

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 74.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Line.prototype.onGridClick = function(x, y) {
                                                                                                    var index;
                                                                                                    index = this.hitTest(x);
                                                                                                    return this.fire('click', index, this.data[index].src, x, y);
                                                                                                  };
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1569..1573

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 69.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Bar.prototype.onGridClick = function(x, y) {
                                                                                                    var index;
                                                                                                    index = this.hitTest(x);
                                                                                                    return this.fire('click', index, this.data[index].src, x, y);
                                                                                                  };
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 811..815

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 69.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (typeof options.element === 'string') {
                                                                                                      this.el = $(document.getElementById(options.element));
                                                                                                    } else {
                                                                                                      this.el = $(options.element);
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 79..83

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 67.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (typeof options.element === 'string') {
                                                                                                      this.el = $(document.getElementById(options.element));
                                                                                                    } else {
                                                                                                      this.el = $(options.element);
                                                                                                    }
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1650..1654

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 67.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (this.selected) {
                                                                                                      this.seg.animate({
                                                                                                        path: this.path
                                                                                                      }, 150, '<>');
                                                                                                      this.arc.animate({
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1865..1873

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 65.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (!this.selected) {
                                                                                                      this.seg.animate({
                                                                                                        path: this.selectedPath
                                                                                                      }, 150, '<>');
                                                                                                      this.arc.animate({
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1877..1885

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 65.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                      if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1473..1473

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 58.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                      if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < this.el.width()) {
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 916..916

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 58.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    return ("M" + ix0 + "," + iy0) + ("A" + r1 + "," + r1 + ",0," + this.is_long + ",0," + ix1 + "," + iy1) + ("L" + ox1 + "," + oy1) + ("A" + r2 + "," + r2 + ",0," + this.is_long + ",1," + ox0 + "," + oy0) + "Z";
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1835..1835

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 57.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    return ("M" + ix0 + "," + iy0) + ("A" + r + "," + r + ",0," + this.is_long + ",0," + ix1 + "," + iy1);
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 1 hr to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1829..1829

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 57.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                              Open

                                                                                                    _ref = this.calcArcPoints(r1), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 2 other locations - About 55 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1828..1828
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1834..1834

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 53.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                              Open

                                                                                                    _ref1 = this.calcArcPoints(r2), ox0 = _ref1[0], oy0 = _ref1[1], ox1 = _ref1[2], oy1 = _ref1[3];
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 2 other locations - About 55 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1827..1827
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1834..1834

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 53.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                              Open

                                                                                                    _ref = this.calcArcPoints(r), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
                                                                                              Severity: Major
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 2 other locations - About 55 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1827..1827
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1828..1828

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 53.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Line.prototype.pointStrokeColorForSeries = function(index) {
                                                                                                    return this.options.pointStrokeColors[index % this.options.pointStrokeColors.length];
                                                                                                  };
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 50 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1098..1100

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 52.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                  Line.prototype.pointStrokeWidthForSeries = function(index) {
                                                                                                    return this.options.pointStrokeWidths[index % this.options.pointStrokeWidths.length];
                                                                                                  };
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 50 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1102..1104

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 52.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (typeof this.options.hoverCallback === 'function') {
                                                                                                      content = this.options.hoverCallback(index, this.options, content, row.src);
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 50 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1596..1598

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 51.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Identical blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if (typeof this.options.hoverCallback === 'function') {
                                                                                                      content = this.options.hoverCallback(index, this.options, content, row.src);
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 50 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 849..851

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 51.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
                                                                                                      this.drawXAxis();
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 40 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 889..891

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 49.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
                                                                                                      this.drawXAxis();
                                                                                                    }
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 40 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1450..1452

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 49.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    var e, idx, index, maxGoal, minGoal, ret, row, step, total, y, ykey, ymax, ymin, yval, _ref;
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 35 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 1487..1487

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 47.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                    var barWidth, bottom, groupWidth, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos;
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 35 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/morris/morris.js on lines 200..200

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 47.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              Similar blocks of code found in 2 locations. Consider refactoring.
                                                                                              Open

                                                                                                      if (this.options.ymax === this.gridDefaults.ymax && this.options.ymin === this.gridDefaults.ymin) {
                                                                                              Severity: Minor
                                                                                              Found in public_/plantillas/inspinia/js/plugins/morris/morris.js and 1 other location - About 30 mins to fix
                                                                                              public_/plantillas/inspinia/js/plugins/codemirror/codemirror.js on lines 1021..1021

                                                                                              Duplicated Code

                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                              Tuning

                                                                                              This issue has a mass of 45.

                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                              Refactorings

                                                                                              Further Reading

                                                                                              There are no issues that match your filters.

                                                                                              Category
                                                                                              Status