BallStateCBER/datacenter-plugin-cakephp3

View on GitHub
webroot/js/jquery.qtip.js

Summary

Maintainability
F
3 wks
Test Coverage

File jquery.qtip.js has 2351 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * qTip2 - Pretty powerful tooltips - v2.0.1-108
 * http://qtip2.com
 *
 * Copyright (c) 2013 Craig Michael Thompson
Severity: Major
Found in webroot/js/jquery.qtip.js - About 6 days to fix

    Consider simplifying this complex logical expression.
    Open

        else if(target === 'mouse' && ((event && event.pageX) || cache.event.pageX)) {
            // Force left top to allow flipping
            at = { x: LEFT, y: TOP };
    
            // Use cached event if one isn't available for positioning
    Severity: Critical
    Found in webroot/js/jquery.qtip.js - About 6 hrs to fix

      Function reposition has 121 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      ;PROTOTYPE.reposition = function(event, effect) {
          if(!this.rendered || this.positioning || this.destroyed) { return this; }
      
          // Set positioning flag
          this.positioning = TRUE;
      Severity: Major
      Found in webroot/js/jquery.qtip.js - About 4 hrs to fix

        Function update has 103 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            update: function(corner, position) {
                if(!this.enabled) { return this; }
        
                var elements = this.qtip.elements,
                    tip = this.element,
        Severity: Major
        Found in webroot/js/jquery.qtip.js - About 4 hrs to fix

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

          PROTOTYPE.toggle = function(state, event) {
              var cache = this.cache,
                  options = this.options,
                  tooltip = this.tooltip;
          
          
          Severity: Major
          Found in webroot/js/jquery.qtip.js - About 3 hrs to fix

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

            PROTOTYPE._assignEvents = function() {
                var options = this.options,
                    posOptions = options.position,
            
                    tooltip = this.tooltip,
            Severity: Major
            Found in webroot/js/jquery.qtip.js - About 3 hrs to fix

              Consider simplifying this complex logical expression.
              Open

                                  if((corner.x === LEFT && realX >= compareX) ||
                                  (corner.x === RIGHT && realX <= compareX) ||
                                  (corner.x === CENTER && (realX < compareX || realX > (result.width - compareX))) ||
                                  (corner.y === TOP && realY >= compareY) ||
                                  (corner.y === BOTTOM && realY <= compareY) ||
              Severity: Critical
              Found in webroot/js/jquery.qtip.js - About 3 hrs to fix

                Function viewport has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                ;PLUGINS.viewport = function(api, position, posOptions, targetWidth, targetHeight, elemWidth, elemHeight)
                {
                    var target = posOptions.target,
                        tooltip = api.elements.tooltip,
                        my = posOptions.my,
                Severity: Major
                Found in webroot/js/jquery.qtip.js - About 3 hrs to fix

                  Function imagesLoaded has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  $.fn.imagesLoaded = function( callback ) {
                      var $this = this,
                          deferred = $.isFunction($.Deferred) ? $.Deferred() : 0,
                          hasNotify = $.isFunction(deferred.notify),
                          $images = $this.find('img').add( $this.filter('img') ),
                  Severity: Major
                  Found in webroot/js/jquery.qtip.js - About 2 hrs to fix

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

                    PROTOTYPE.render = function(show) {
                        if(this.rendered || this.destroyed) { return this; } // If tooltip has already been rendered, exit
                    
                        var self = this,
                            options = this.options,
                    Severity: Major
                    Found in webroot/js/jquery.qtip.js - About 2 hrs to fix

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

                          reposition: function(event, api, pos, viewport) {
                              if(!this.enabled) { return; }
                      
                              var cache = api.cache,
                                  newCorner = this.corner.clone(),
                      Severity: Major
                      Found in webroot/js/jquery.qtip.js - About 2 hrs to fix

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

                        function sanitizeOptions(opts) {
                            var content, text, ajax, once;
                        
                            if(invalidOpt(opts)) { return FALSE; }
                        
                        
                        Severity: Major
                        Found in webroot/js/jquery.qtip.js - About 2 hrs to fix

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

                              polygon: function(baseCoords, corner) {
                                  var result = {
                                      width: 0, height: 0,
                                      position: {
                                          top: 1e10, right: 0,
                          Severity: Major
                          Found in webroot/js/jquery.qtip.js - About 2 hrs to fix

                            Function svg has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            };;PLUGINS.svg = function(api, svg, corner, adjustMethod)
                            {
                                var doc = $(document),
                                    elem = svg[0],
                                    result = FALSE,
                            Severity: Minor
                            Found in webroot/js/jquery.qtip.js - About 2 hrs to fix

                              Function bind has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              QTIP.bind = function(opts, event)
                              {
                                  return this.each(function(i) {
                                      var options, targets, events, namespace, api, id;
                              
                              
                              Severity: Minor
                              Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                function init(elem, id, opts)
                                {
                                    var obj, posOptions, attr, config, title,
                                
                                    // Setup element references
                                Severity: Minor
                                Found in webroot/js/jquery.qtip.js - About 1 hr to fix

                                  Function toggle has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          toggle: function(api, state, duration) {
                                              var docBody = $(document.body),
                                                  tooltip = api.tooltip,
                                                  options = api.options.show.modal,
                                                  effect = options.effect,
                                  Severity: Minor
                                  Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                        function calculate(side, otherSide, type, adjust, side1, side2, lengthName, targetLength, elemLength) {
                                            var initialPos = position[side1],
                                                mySide = my[side], atSide = at[side],
                                                isShift = type === SHIFT,
                                                viewportScroll = -container.offset[side1] + viewport.offset[side1] + viewport['scroll'+side1],
                                    Severity: Minor
                                    Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                          init: function(qtip) {
                                              var tooltip = qtip.tooltip;
                                      
                                              // If modal is disabled... return
                                              if(!this.options.on) { return this; }
                                      Severity: Minor
                                      Found in webroot/js/jquery.qtip.js - About 1 hr to fix

                                        Function qtip has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        QTIP = $.fn.qtip = function(options, notation, newValue)
                                        {
                                            var command = ('' + options).toLowerCase(), // Parse command
                                                returned = NULL,
                                                args = $.makeArray(arguments).slice(1),
                                        Severity: Minor
                                        Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                          PROTOTYPE.destroy = function(immediate) {
                                              // Set flag the signify destroy is taking place to plugins
                                              // and ensure it only gets destroyed once!
                                              if(this.destroyed) { return this.target; }
                                          
                                          
                                          Severity: Minor
                                          Found in webroot/js/jquery.qtip.js - About 1 hr to fix

                                            Function offset has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                            PROTOTYPE.reposition.offset = function(elem, pos, container) {
                                                if(!container[0]) { return pos; }
                                            
                                                var ownerDocument = $(elem[0].ownerDocument),
                                                    quirks = !!BROWSER.ie && document.compatMode !== 'CSS1Compat',
                                            Severity: Minor
                                            Found in webroot/js/jquery.qtip.js - About 1 hr to fix

                                              Function calculate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  calculate: function(corner) {
                                                      if(!this.enabled) { return FALSE; }
                                              
                                                      var self = this,
                                                          elements = this.qtip.elements,
                                              Severity: Minor
                                              Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                                ;PROTOTYPE._update = function(content, element, reposition) {
                                                    var self = this,
                                                        cache = this.cache;
                                                
                                                    // Make sure tooltip is rendered and content is defined. If not return
                                                Severity: Minor
                                                Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                                  ;PROTOTYPE._createButton = function()
                                                  {
                                                      var self = this,
                                                          elements = this.elements,
                                                          tooltip = elements.tooltip,
                                                  Severity: Minor
                                                  Found in webroot/js/jquery.qtip.js - About 1 hr to fix

                                                    Function calculate has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        function calculate(side, otherSide, type, adjust, side1, side2, lengthName, targetLength, elemLength) {
                                                    Severity: Major
                                                    Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                                      PROTOTYPE.set = function(option, value) {
                                                          if(this.destroyed) { return this; }
                                                      
                                                          var rendered = this.rendered,
                                                              reposition = FALSE,
                                                      Severity: Minor
                                                      Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                                                init: function() {
                                                                    // Create document overlay
                                                                    elem = self.elem = $('<div />', {
                                                                        id: 'qtip-overlay',
                                                                        html: '<div></div>',
                                                        Severity: Minor
                                                        Found in webroot/js/jquery.qtip.js - About 1 hr to fix

                                                          Consider simplifying this complex logical expression.
                                                          Open

                                                              if(this !== relatedTarget[0] && 
                                                                  (this.options.position.target === 'mouse' && ontoTooltip) || 
                                                                  (this.options.hide.fixed && (
                                                                      (/mouse(out|leave|move)/).test(event.type) && (ontoTooltip || ontoTarget))
                                                                  ))
                                                          Severity: Major
                                                          Found in webroot/js/jquery.qtip.js - About 1 hr to fix

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

                                                            ;PLUGINS.viewport = function(api, position, posOptions, targetWidth, targetHeight, elemWidth, elemHeight)
                                                            Severity: Major
                                                            Found in webroot/js/jquery.qtip.js - About 50 mins to fix

                                                              Consider simplifying this complex logical expression.
                                                              Open

                                                                      if((BROWSER.iOS > 3.1 && BROWSER.iOS < 4.1) || 
                                                                          (BROWSER.iOS >= 4.3 && BROWSER.iOS < 4.33) || 
                                                                          (!BROWSER.iOS && type === 'fixed')
                                                                      ){
                                                                          position.left -= win.scrollLeft();
                                                              Severity: Major
                                                              Found in webroot/js/jquery.qtip.js - About 40 mins to fix

                                                                Consider simplifying this complex logical expression.
                                                                Open

                                                                    if(effect === FALSE || !visible || isNaN(position.left) || isNaN(position.top) || target === 'mouse' || !$.isFunction(posOptions.effect)) {
                                                                        tooltip.css(position);
                                                                    }
                                                                
                                                                    // Use custom function if provided
                                                                Severity: Major
                                                                Found in webroot/js/jquery.qtip.js - About 40 mins to fix

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

                                                                  PROTOTYPE._bind = function(targets, events, method, suffix, context) {
                                                                  Severity: Minor
                                                                  Found in webroot/js/jquery.qtip.js - About 35 mins to fix

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

                                                                        rect: function(ax, ay, bx, by, corner) {
                                                                    Severity: Minor
                                                                    Found in webroot/js/jquery.qtip.js - About 35 mins to fix

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

                                                                          ellipse: function(cx, cy, rx, ry, corner) {
                                                                      Severity: Minor
                                                                      Found in webroot/js/jquery.qtip.js - About 35 mins to fix

                                                                        Avoid too many return statements within this function.
                                                                        Open

                                                                            return this;
                                                                        Severity: Major
                                                                        Found in webroot/js/jquery.qtip.js - About 30 mins to fix

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

                                                                                  if(shift.top = (vertical === SHIFT && !!adjust.top)) {
                                                                                      if(newCorner.y === CENTER) {
                                                                                          css[MARGIN+'-top'] = shift.y = offset[MARGIN+'-top'] - adjust.top;
                                                                                      }
                                                                                      else {
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 day to fix
                                                                          webroot/js/jquery.qtip.js on lines 2424..2439

                                                                          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 204.

                                                                          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(shift.left = (horizontal === SHIFT && !!adjust.left)) {
                                                                                      if(newCorner.x === CENTER) {
                                                                                          css[MARGIN+'-left'] = shift.x = offset[MARGIN+'-left'] - adjust.left;
                                                                                      }
                                                                                      else {
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 day to fix
                                                                          webroot/js/jquery.qtip.js on lines 2440..2455

                                                                          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 204.

                                                                          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(horizontal === SHIFT && newCorner.precedance === X && adjust.left && newCorner.y !== CENTER) {
                                                                                          newCorner.precedance = newCorner.precedance === X ? Y : X;
                                                                                      }
                                                                                      else if(horizontal !== SHIFT && adjust.left){
                                                                                          newCorner.x = newCorner.x === CENTER ? (adjust.left > 0 ? LEFT : RIGHT) : (newCorner.x === LEFT ? RIGHT : LEFT);
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 5 hrs to fix
                                                                          webroot/js/jquery.qtip.js on lines 2402..2407

                                                                          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 145.

                                                                          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(vertical === SHIFT && newCorner.precedance === Y && adjust.top && newCorner.x !== CENTER) {
                                                                                          newCorner.precedance = newCorner.precedance === Y ? X : Y;
                                                                                      }
                                                                                      else if(vertical !== SHIFT && adjust.top) {
                                                                                          newCorner.y = newCorner.y === CENTER ? (adjust.top > 0 ? TOP : BOTTOM) : (newCorner.y === TOP ? BOTTOM : TOP);
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 5 hrs to fix
                                                                          webroot/js/jquery.qtip.js on lines 2394..2399

                                                                          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 145.

                                                                          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(corner.y === TOP){ compareY = newHeight; }
                                                                                          else if(corner.y === BOTTOM){ compareY = result.height - newHeight; }
                                                                                          else{ compareY += Math.floor(newHeight / 2); }
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 2 hrs to fix
                                                                          webroot/js/jquery.qtip.js on lines 3043..3045

                                                                          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 76.

                                                                          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(corner.x === LEFT){ compareX = newWidth; }
                                                                                          else if(corner.x === RIGHT){ compareX = result.width - newWidth; }
                                                                                          else{ compareX += Math.floor(newWidth / 2); }
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 2 hrs to fix
                                                                          webroot/js/jquery.qtip.js on lines 3047..3049

                                                                          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 76.

                                                                          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

                                                                                  pos.top -= offset.top.charAt ? offset.user : vertical !== SHIFT || shift.left || !shift.left && !shift.top ? offset.top : 0;
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 2467..2467

                                                                          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 70.

                                                                          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

                                                                                  pos.left -= offset.left.charAt ? offset.user : horizontal !== SHIFT || shift.top || !shift.left && !shift.top ? offset.left : 0;
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 2468..2468

                                                                          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 70.

                                                                          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.show.delay > 0) {
                                                                                  this.timers.show = setTimeout(callback, this.options.show.delay);
                                                                              }
                                                                              else{ callback(); }
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 1281..1284

                                                                          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

                                                                                          round(mimic.x === LEFT ? border : mimic.x === RIGHT ? newSize[0] - size[0] - border : (newSize[0] - size[0]) / 2),
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 2247..2247

                                                                          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.options.hide.delay > 0) {
                                                                                  this.timers.hide = setTimeout(callback, this.options.hide.delay);
                                                                              }
                                                                              else{ callback(); }
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 1245..1248

                                                                          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

                                                                                          round(mimic.y === TOP ? border : mimic.y === BOTTOM ? newSize[1] - size[1] - border : (newSize[1] - size[1]) / 2)
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 2240..2240

                                                                          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

                                                                              _resetDimensions: function() {
                                                                                  this.size[0] = this.options.width;
                                                                                  this.size[1] = this.options.height;
                                                                              },
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 2025..2028

                                                                          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 56.

                                                                          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

                                                                              _swapDimensions: function() {
                                                                                  this.size[0] = this.options.height;
                                                                                  this.size[1] = this.options.width;
                                                                              },
                                                                          Severity: Major
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 1 hr to fix
                                                                          webroot/js/jquery.qtip.js on lines 2029..2032

                                                                          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 56.

                                                                          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

                                                                              position.left += adjust.x + (my.x === RIGHT ? -elemWidth : my.x === CENTER ? -elemWidth / 2 : 0);
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 55 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 824..824

                                                                          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 54.

                                                                          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

                                                                              position.top += adjust.y + (my.y === BOTTOM ? -elemHeight : my.y === CENTER ? -elemHeight / 2 : 0);
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 55 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 823..823

                                                                          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 54.

                                                                          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

                                                                              this.rendered = this.destroyed = this.disabled = this.waiting = 
                                                                                  this.hiddenDuringWait = this.positioning = this.triggering = FALSE;
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 40 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 280..281

                                                                          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

                                                                                  this.options = this.elements = this.cache = this.timers = 
                                                                                      this.plugins = this.mouse = NULL;
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 40 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 123..124

                                                                          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

                                                                                  showEvents = options.show.event ? $.trim('' + options.show.event).split(' ') : [],
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 40 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 1396..1396

                                                                          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 48.

                                                                          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

                                                                                  hideEvents = options.hide.event ? $.trim('' + options.hide.event).split(' ') : [],
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 40 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 1395..1395

                                                                          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 48.

                                                                          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

                                                                                      position = PLUGINS.svg.toPixel(elem,
                                                                                          elem.cx.baseVal.value,
                                                                                          elem.cy.baseVal.value
                                                                                      );
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 30 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 3122..3122

                                                                          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

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

                                                                                      position = PLUGINS.svg.toPixel(elem, elem.x.baseVal.value, elem.y.baseVal.value);
                                                                          Severity: Minor
                                                                          Found in webroot/js/jquery.qtip.js and 1 other location - About 30 mins to fix
                                                                          webroot/js/jquery.qtip.js on lines 3137..3140

                                                                          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