kalenjordan/magehero

View on GitHub

Showing 125 of 125 total issues

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

        _update: function(content) {
            
            var self = this;
            
            // change the content
Severity: Minor
Found in skin/js/src/lib/jquery.tooltipster.js - About 1 hr to fix

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

      EpicEditor.prototype._autogrow = function () {
        var editorHeight
          , newHeight
          , minHeight
          , maxHeight
    Severity: Minor
    Found in epiceditor/js/epiceditor.js - About 1 hr to fix

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

          Chosen.prototype.set_up_html = function() {
            var container_classes, container_props;
            container_classes = ["chosen-container"];
            container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
            if (this.inherit_select_classes && this.form_field.className) {
      Severity: Minor
      Found in skin/js/src/lib/chosen.jquery.js - About 1 hr to fix

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

                function getUsers() {
        
                    $.getJSON("/map/users", function(data) {
                            var i = 0,
                                row = {},
        Severity: Minor
        Found in skin/js/map.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if (typeof args[0] === 'string') {
                          
                          var v = '#*$~&';
                          
                          this.each(function() {
          Severity: Critical
          Found in skin/js/src/lib/jquery.tooltipster.js - About 1 hr to fix

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

              function _mergeObjs() {
                // copy reference to target object
                var target = arguments[0] || {}
                  , i = 1
                  , length = arguments.length
            Severity: Minor
            Found in epiceditor/js/epiceditor.js - About 1 hr to fix

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

                function _isFirefox() {
                  var n = window.navigator;
                  return n.userAgent.indexOf('Firefox') > -1 && n.userAgent.indexOf('Seamonkey') == -1;
                }
              Severity: Major
              Found in epiceditor/js/epiceditor.js and 1 other location - About 1 hr to fix
              epiceditor/js/epiceditor.js on lines 225..228

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

              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 _isSafari() {
                  var n = window.navigator;
                  return n.userAgent.indexOf('Safari') > -1 && n.userAgent.indexOf('Chrome') == -1;
                }
              Severity: Major
              Found in epiceditor/js/epiceditor.js and 1 other location - About 1 hr to fix
              epiceditor/js/epiceditor.js on lines 235..238

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

              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 save has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                EpicEditor.prototype.save = function (_isPreviewDraft, _isAuto) {
                  var self = this
                    , storage
                    , isUpdate = false
                    , file = self.settings.file.name
              Severity: Minor
              Found in epiceditor/js/epiceditor.js - About 1 hr to fix

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

                                            if (arrayAlternate == 'even') {
                                                if (areaNumber > areaGreatestX) {
                                                    areaGreatestX = areaNumber;
                                                    if (i === 0) {
                                                        areaSmallestX = areaGreatestX;
                Severity: Major
                Found in skin/js/src/lib/jquery.tooltipster.js and 1 other location - About 1 hr to fix
                skin/js/src/lib/jquery.tooltipster.js on lines 789..802

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

                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 (areaNumber > areaGreatestY) {
                                                    areaGreatestY = areaNumber;
                                                    if (i == 1) {
                                                        areaSmallestY = areaGreatestY;
                Severity: Major
                Found in skin/js/src/lib/jquery.tooltipster.js and 1 other location - About 1 hr to fix
                skin/js/src/lib/jquery.tooltipster.js on lines 775..788

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

                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 result_select has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    Chosen.prototype.result_select = function(evt) {
                      var high, item;
                      if (this.result_highlight) {
                        high = this.result_highlight;
                        this.result_clear_highlight();
                Severity: Minor
                Found in skin/js/src/lib/chosen.jquery.js - About 1 hr to fix

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

                        if (this.is_multiple) {
                          this.search_choices = this.container.find('ul.chosen-choices').first();
                          this.search_container = this.container.find('li.search-field').first();
                        } else {
                  Severity: Major
                  Found in skin/js/src/lib/chosen.jquery.js and 1 other location - About 1 hr to fix
                  skin/js/src/lib/chosen.jquery.js on lines 595..598

                  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

                        } else {
                          this.search_container = this.container.find('div.chosen-search').first();
                          this.selected_item = this.container.find('.chosen-single').first();
                        }
                  Severity: Major
                  Found in skin/js/src/lib/chosen.jquery.js and 1 other location - About 1 hr to fix
                  skin/js/src/lib/chosen.jquery.js on lines 592..595

                  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

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

                      Chosen.prototype.keydown_checker = function(evt) {
                        var stroke, _ref1;
                        stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
                        this.search_field_scale();
                        if (stroke !== 8 && this.pending_backstroke) {
                  Severity: Minor
                  Found in skin/js/src/lib/chosen.jquery.js - About 1 hr to fix

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

                        public function getSlug()
                        {
                            $text = $this->getSubject();
                    
                            // replace non letter or digits by -
                    Severity: Major
                    Found in code/Model/Post.php and 1 other location - About 1 hr to fix
                    code/Model/Tag.php on lines 78..98

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

                    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

                        public function getSlug()
                        {
                            $text = $this->getTagText();
                    
                            // replace non letter or digits by -
                    Severity: Major
                    Found in code/Model/Tag.php and 1 other location - About 1 hr to fix
                    code/Model/Post.php on lines 322..342

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

                    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

                    Method selectAll has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function selectAll()
                        {
                            $postsQuery = $this->_localConfig->database()->select()
                                ->from('posts', array(
                                    'user_id',
                    Severity: Minor
                    Found in code/Model/User.php - About 1 hr to fix

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

                          AbstractChosen.prototype.keyup_checker = function(evt) {
                            var stroke, _ref;
                            stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
                            this.search_field_scale();
                            switch (stroke) {
                      Severity: Minor
                      Found in skin/js/src/lib/chosen.jquery.js - About 1 hr to fix

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

                            case 'blockquote_start': {
                              var body = '';
                        
                              while (this.next().type !== 'blockquote_end') {
                                body += this.tok();
                        Severity: Major
                        Found in epiceditor/js/epiceditor.js and 1 other location - About 1 hr to fix
                        epiceditor/js/epiceditor.js on lines 2764..2774

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language