kalenjordan/magehero

View on GitHub

Showing 125 of 125 total issues

Function register_observers has 79 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Chosen.prototype.register_observers = function() {
      var _this = this;
      this.container.bind('touchstart.chosen', function(evt) {
        _this.container_mousedown(evt);
      });
Severity: Major
Found in skin/js/src/lib/chosen.jquery.js - About 3 hrs to fix

    Function pluginName has 75 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn[pluginName] = function () {
            
            // for using in closures
            var args = arguments;
            
    Severity: Major
    Found in skin/js/src/lib/jquery.tooltipster.js - About 3 hrs to fix

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

            item = {
              type: 'table',
              header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
              align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
              cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')
      Severity: Major
      Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
      epiceditor/js/epiceditor.js on lines 2050..2055

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 91.

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

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

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

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

      Refactorings

      Further Reading

      Function _goFullscreen has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          self._goFullscreen = function (el) {
            this._fixScrollbars('auto');
      
            if (self.is('fullscreen')) {
              self._exitFullscreen(el);
      Severity: Major
      Found in epiceditor/js/epiceditor.js - About 2 hrs to fix

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

              item = {
                type: 'table',
                header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
                align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
                cells: cap[3].replace(/\n$/, '').split('\n')
        Severity: Major
        Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
        epiceditor/js/epiceditor.js on lines 2210..2215

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 91.

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

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

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

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

        Refactorings

        Further Reading

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

            if (cap = this.rules.em.exec(src)) {
              src = src.substring(cap[0].length);
              out += '<em>'
                + this.output(cap[2] || cap[1])
                + '</em>';
        Severity: Major
        Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
        epiceditor/js/epiceditor.js on lines 2467..2473

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

        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 (cap = this.rules.strong.exec(src)) {
              src = src.substring(cap[0].length);
              out += '<strong>'
                + this.output(cap[2] || cap[1])
                + '</strong>';
        Severity: Major
        Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
        epiceditor/js/epiceditor.js on lines 2476..2482

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

        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 (!kind || kind == 'width') {
                newWidth = self.element.offsetWidth - widthDiff + 'px';
                elements[x].style.width = newWidth;
                self._eeState.reflowWidth = newWidth;
                eventData.width = newWidth;
        Severity: Major
        Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
        epiceditor/js/epiceditor.js on lines 1267..1272

        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

              _elementStates.editorIframe = _saveStyleState(self.editorIframe, 'save', {
                'width': windowOuterWidth / 2 + 'px'
              , 'height': windowOuterHeight + 'px'
              , 'float': 'left' // Most browsers
              , 'cssFloat': 'left' // FF
        Severity: Major
        Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
        epiceditor/js/epiceditor.js on lines 741..750

        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

              if (!kind || kind == 'height') {
                newHeight = self.element.offsetHeight - heightDiff + 'px';
                elements[x].style.height = newHeight;
                self._eeState.reflowHeight = newHeight
                eventData.height = newHeight;
        Severity: Major
        Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
        epiceditor/js/epiceditor.js on lines 1261..1266

        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

              _elementStates.previewerIframe = _saveStyleState(self.previewerIframe, 'save', {
                'width': windowOuterWidth / 2 + 'px'
              , 'height': windowOuterHeight + 'px'
              , 'float': 'right' // Most browsers
              , 'cssFloat': 'right' // FF
        Severity: Major
        Found in epiceditor/js/epiceditor.js and 1 other location - About 2 hrs to fix
        epiceditor/js/epiceditor.js on lines 729..738

        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

        File Post.php has 270 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        class Model_Post extends Model_Record
        {
            protected $_data;
        Severity: Minor
        Found in code/Model/Post.php - About 2 hrs to fix

          Function _init has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _init: function() {
                      
                      var self = this;
                      
                      // disable the plugin on old browsers (including IE7 and lower)
          Severity: Major
          Found in skin/js/src/lib/jquery.tooltipster.js - About 2 hrs to fix

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

                gulp.src('sass/styles.scss')
                    .pipe(plugins.plumber())
                    .pipe(plugins.sass())
                    .pipe(plugins.minifyCss({keepBreaks:true}))
                    .pipe(gulp.dest('css'));
            Severity: Major
            Found in skin/Gulpfile.js and 1 other location - About 2 hrs to fix
            skin/Gulpfile.js on lines 14..18

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 79.

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

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

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

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

            Refactorings

            Further Reading

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

                gulp.src('sass/map.scss')
                    .pipe(plugins.plumber())
                    .pipe(plugins.sass())
                    .pipe(plugins.minifyCss({keepBreaks:true}))
                    .pipe(gulp.dest('css'));
            Severity: Major
            Found in skin/Gulpfile.js and 1 other location - About 2 hrs to fix
            skin/Gulpfile.js on lines 8..12

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 79.

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

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

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

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

            Refactorings

            Further Reading

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

                    init : function(object) {
            
                        if ( !$(object).attr("id") ) {
                            if ( $(object).attr("name") ) {
                                $(object).attr("id", $(object).attr("name") );
            Severity: Major
            Found in skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js - About 2 hrs to fix

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

                  AbstractChosen.prototype.winnow_results = function() {
                    var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
                    this.no_results_clear();
                    results = 0;
                    searchText = this.get_search_text();
              Severity: Major
              Found in skin/js/src/lib/chosen.jquery.js - About 2 hrs to fix

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

                            _self.params.defLat  = $(_self.vars.cssID + ".profile-map-latitude").val()  ? $(_self.vars.cssID + ".profile-map-latitude").val()        : _self.params.defLat;
                Severity: Major
                Found in skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js and 1 other location - About 2 hrs to fix
                skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js on lines 163..163

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

                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

                            _self.params.defLng  = $(_self.vars.cssID + ".profile-map-longitude").val() ? $(_self.vars.cssID + ".profile-map-longitude").val()        : _self.params.defLng;
                Severity: Major
                Found in skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js and 1 other location - About 2 hrs to fix
                skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js on lines 162..162

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

                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

                Function hide has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        hide: function(callback) {
                            
                            var self = this;
                            
                            // save the method custom callback and cancel any show method custom callbacks
                Severity: Minor
                Found in skin/js/src/lib/jquery.tooltipster.js - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language