civio/quienmanda.es

View on GitHub
app/assets/javascripts/packery.pkgd.js

Summary

Maintainability
F
3 wks
Test Coverage

File packery.pkgd.js has 2209 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * Packery PACKAGED v1.3.2
 * bin-packing layout library
 * http://packery.metafizzy.co
 *
Severity: Major
Found in app/assets/javascripts/packery.pkgd.js - About 6 days to fix

    Function outlayerDefinition has 501 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function outlayerDefinition( eventie, docReady, EventEmitter, getSize, matchesSelector, Item ) {
    
    // -------------------------- Outlayer -------------------------- //
    
    // globally unique identifiers
    Severity: Major
    Found in app/assets/javascripts/packery.pkgd.js - About 2 days to fix

      Function outlayerItemDefinition has 297 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function outlayerItemDefinition( EventEmitter, getSize, getStyleProperty ) {
      
      // -------------------------- CSS3 support -------------------------- //
      
      var transitionProperty = getStyleProperty('transition');
      Severity: Major
      Found in app/assets/javascripts/packery.pkgd.js - About 1 day to fix

        Function packeryDefinition has 259 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function packeryDefinition( classie, getSize, Outlayer, Rect, Packer, Item ) {
        
        // ----- Rect ----- //
        
        // allow for pixel rounding errors IE8-IE11 & Firefox; #227
        Severity: Major
        Found in app/assets/javascripts/packery.pkgd.js - About 1 day to fix

          Function defineGetSize has 108 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function defineGetSize( getStyleProperty ) {
          
          // -------------------------- setup -------------------------- //
          
          var isSetup = false;
          Severity: Major
          Found in app/assets/javascripts/packery.pkgd.js - About 4 hrs to fix

            Function rectDefinition has 85 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function rectDefinition() {
            
            // -------------------------- Rect -------------------------- //
            
            function Rect( props ) {
            Severity: Major
            Found in app/assets/javascripts/packery.pkgd.js - About 3 hrs to fix

              Function itemDefinition has 84 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function itemDefinition( getStyleProperty, Outlayer, Rect ) {
              
              var transformProperty = getStyleProperty('transform');
              
              // sub-class Item
              Severity: Major
              Found in app/assets/javascripts/packery.pkgd.js - About 3 hrs to fix

                Function packerDefinition has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function packerDefinition( Rect ) {
                
                /**
                 * @param {Number} width
                 * @param {Number} height
                Severity: Major
                Found in app/assets/javascripts/packery.pkgd.js - About 3 hrs to fix

                  Function defineBridget has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function defineBridget( $ ) {
                  
                  // bail if no jQuery
                  if ( !$ ) {
                    return;
                  Severity: Major
                  Found in app/assets/javascripts/packery.pkgd.js - About 2 hrs to fix

                    Function create has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Outlayer.create = function( namespace, options ) {
                      // sub-class Outlayer
                      function Layout() {
                        Outlayer.apply( this, arguments );
                      }
                    Severity: Minor
                    Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

                      Function getMaximalFreeRects has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Rect.prototype.getMaximalFreeRects = function( rect ) {
                      
                        // if no intersection, return false
                        if ( !this.overlaps( rect ) ) {
                          return false;
                      Severity: Minor
                      Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

                        Function getSize has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function getSize( elem ) {
                          setup();
                        
                          // use querySeletor if elem is string
                          if ( typeof elem === 'string' ) {
                        Severity: Minor
                        Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

                          Function setup has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function setup() {
                            // setup once
                            if ( isSetup ) {
                              return;
                            }
                          Severity: Minor
                          Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

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

                            function bridge( namespace, PluginClass ) {
                              // add to jQuery fn namespace
                              $.fn[ namespace ] = function( options ) {
                                if ( typeof options === 'string' ) {
                                  // call plugin method when first argument is a string
                            Severity: Minor
                            Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

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

                                $.fn[ namespace ] = function( options ) {
                                  if ( typeof options === 'string' ) {
                                    // call plugin method when first argument is a string
                                    // get arguments for method
                                    var args = slice.call( arguments, 1 );
                              Severity: Minor
                              Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

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

                                Item.prototype.getPlaceRectCoord = function( coord, isX, isMaxOpen ) {
                                  var measure = isX ? 'Width' : 'Height';
                                  var size = this.size[ 'outer' + measure ];
                                  var segment = this.layout[ isX ? 'columnWidth' : 'rowHeight' ];
                                  var parentSize = this.layout.size[ 'inner' + measure ];
                                Severity: Minor
                                Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

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

                                  Packery.prototype._create = function() {
                                    // call super
                                    Outlayer.prototype._create.call( this );
                                  
                                    // initial properties
                                  Severity: Minor
                                  Found in app/assets/javascripts/packery.pkgd.js - About 1 hr to fix

                                    Function packeryDefinition has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    function packeryDefinition( classie, getSize, Outlayer, Rect, Packer, Item ) {
                                    Severity: Minor
                                    Found in app/assets/javascripts/packery.pkgd.js - About 45 mins to fix

                                      Function outlayerDefinition has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      function outlayerDefinition( eventie, docReady, EventEmitter, getSize, matchesSelector, Item ) {
                                      Severity: Minor
                                      Found in app/assets/javascripts/packery.pkgd.js - About 45 mins to fix

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

                                            proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {
                                                var i;
                                                var value;
                                                var single = remove ? this.removeListener : this.addListener;
                                                var multiple = remove ? this.removeListeners : this.addListeners;
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 1 day to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 265..297

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

                                        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

                                            proto.addListener = function addListener(evt, listener) {
                                                var listeners = this.getListenersAsObject(evt);
                                                var listenerIsWrapped = typeof listener === 'object';
                                                var key;
                                        
                                        
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 5 hrs to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 125..140

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

                                        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 ( docElem.removeEventListener ) {
                                          unbind = function( obj, type, fn ) {
                                            obj.removeEventListener( type, fn, false );
                                          };
                                        } else if ( docElem.detachEvent ) {
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 4 hrs to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 487..501

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

                                        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

                                            proto.removeListener = function removeListener(evt, listener) {
                                                var listeners = this.getListenersAsObject(evt);
                                                var index;
                                                var key;
                                        
                                        
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 4 hrs to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 200..216

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

                                        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

                                        Outlayer.prototype.hide = function( items ) {
                                          var len = items && items.length;
                                          if ( !len ) {
                                            return;
                                          }
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 2 hrs to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 2583..2592

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

                                        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

                                        Outlayer.prototype.reveal = function( items ) {
                                          var len = items && items.length;
                                          if ( !len ) {
                                            return;
                                          }
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 2 hrs to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 2598..2607

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

                                        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

                                            proto.flattenListeners = function flattenListeners(listeners) {
                                                var flatListeners = [];
                                                var i;
                                        
                                                for (i = 0; i < listeners.length; i += 1) {
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 2 hrs to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 86..95

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

                                        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

                                            proto.getListenersAsObject = function getListenersAsObject(evt) {
                                                var listeners = this.getListeners(evt);
                                                var response;
                                        
                                                if (listeners instanceof Array) {
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 2 hrs to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 103..113

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

                                        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 ( typeof define === 'function' && define.amd ) {
                                          // AMD
                                          define( 'classie/classie',classie );
                                        } else if ( typeof exports === 'object' ) {
                                          // CommonJS
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 2 hrs to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 617..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 77.

                                        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 ( typeof define === 'function' && define.amd ) {
                                          // AMD
                                          define( 'eventie/eventie',eventie );
                                        } else if ( typeof exports === 'object' ) {
                                          // CommonJS
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 2 hrs to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 227..236

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

                                        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

                                            proto.defineEvents = function defineEvents(evts) {
                                                for (var i = 0; i < evts.length; i += 1) {
                                                    this.defineEvent(evts[i]);
                                                }
                                                return this;
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 1 hr to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 185..190

                                        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

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

                                                if (evt instanceof RegExp) {
                                                    response = {};
                                                    for (key in events) {
                                                        if (events.hasOwnProperty(key) && evt.test(key)) {
                                                            response[key] = events[key];
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 1 hr to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 65..75

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

                                        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

                                            function indexOfListener(listeners, listener) {
                                                var i = listeners.length;
                                                while (i--) {
                                                    if (listeners[i].listener === listener) {
                                                        return i;
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 1 hr to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 38..47

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

                                        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

                                        Item.prototype.handleEvent = function( event ) {
                                          var method = 'on' + event.type;
                                          if ( this[ method ] ) {
                                            this[ method ]( event );
                                          }
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 1 hr to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 765..770

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

                                        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

                                            proto.emit = function emit(evt) {
                                                var args = Array.prototype.slice.call(arguments, 1);
                                                return this.emitEvent(evt, args);
                                            };
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 1 hr to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 385..388

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

                                        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 ( var i=0, len = elems.length; i < len; i++ ) {
                                            var elem = elems[i];
                                            this.ignore( elem );
                                          }
                                        Severity: Major
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 1 hr to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 628..631

                                        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

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

                                          } else if ( obj && typeof obj.length === 'number' ) {
                                            // convert nodeList to array
                                            for ( var i=0, len = obj.length; i < len; i++ ) {
                                              ary.push( obj[i] );
                                            }
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 55 mins to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 553..561

                                        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

                                        function verticalSorter( a, b ) {
                                          return a.position.y - b.position.y || a.position.x - b.position.x;
                                        }
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 50 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 3582..3584

                                        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

                                            proto._getOnceReturnValue = function _getOnceReturnValue() {
                                                if (this.hasOwnProperty('_onceReturnValue')) {
                                                    return this._onceReturnValue;
                                                }
                                                else {
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 50 mins to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 411..418

                                        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

                                                else if (evt instanceof RegExp) {
                                                    // Remove all events matching the regex.
                                                    for (key in events) {
                                                        if (events.hasOwnProperty(key) && evt.test(key)) {
                                                            delete events[key];
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 50 mins to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 318..329

                                        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

                                        function horizontalSorter( a, b ) {
                                          return a.position.x - b.position.x || a.position.y - b.position.y;
                                        }
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 50 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 3578..3580

                                        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

                                        } else if ( typeof exports === 'object' ) {
                                          // CommonJS
                                          module.exports = outlayerDefinition(
                                            require('eventie'),
                                            require('doc-ready'),
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 45 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 3842..3862

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

                                        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

                                        } else if ( typeof exports === 'object' ) {
                                          // CommonJS
                                          module.exports = packeryDefinition(
                                            require('desandro-classie'),
                                            require('get-size'),
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 45 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 2816..2836

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

                                        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

                                            proto.addOnceListener = function addOnceListener(evt, listener) {
                                                return this.addListener(evt, {
                                                    listener: listener,
                                                    once: true
                                                });
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 35 mins to fix
                                        app/assets/javascripts/jquery.imagesloaded.js on lines 155..160

                                        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 ( layoutOptions.isOriginLeft ) {
                                            style.left = ( this.position.x + layoutSize.paddingLeft ) + 'px';
                                            // reset other property
                                            style.right = '';
                                          } else {
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 35 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 1466..1472

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

                                        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 ( layoutOptions.isOriginTop ) {
                                            style.top = ( this.position.y + layoutSize.paddingTop ) + 'px';
                                            style.bottom = '';
                                          } else {
                                            style.bottom = ( this.position.y + layoutSize.paddingBottom ) + 'px';
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 35 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 1457..1464

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

                                        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

                                          downwardLeftToRight: function( a, b ) {
                                            return a.y - b.y || a.x - b.x;
                                          },
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 30 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 3144..3146

                                        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

                                          rightwardTopToBottom: function( a, b ) {
                                            return a.x - b.x || a.y - b.y;
                                          }
                                        Severity: Minor
                                        Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 30 mins to fix
                                        app/assets/javascripts/packery.pkgd.js on lines 3140..3142

                                        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