kalenjordan/magehero

View on GitHub

Showing 125 of 125 total issues

File epiceditor.js has 1922 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * EpicEditor - An Embeddable JavaScript Markdown Editor (https://github.com/OscarGodson/EpicEditor)
 * Copyright (c) 2011-2012, Oscar Godson. (MIT Licensed)
 */

Severity: Major
Found in epiceditor/js/epiceditor.js - About 5 days to fix

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

    /*!
    Chosen, a Select Box Enhancer for jQuery and Prototype
    by Patrick Filler for Harvest, http://getharvest.com
    
    Version 1.2.0
    Severity: Major
    Found in skin/js/src/lib/chosen.jquery.js - About 2 days to fix

      Function load has 422 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        EpicEditor.prototype.load = function (callback) {
      
          // Get out early if it's already loaded
          if (this.is('loaded')) { return this; }
      
      
      Severity: Major
      Found in epiceditor/js/epiceditor.js - About 2 days to fix

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

        /*
        
        Tooltipster 3.2.6 | 2014-07-16
        A rockin' custom tooltip jQuery plugin
        
        Severity: Major
        Found in skin/js/src/lib/jquery.tooltipster.js - About 2 days to fix

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

                  reposition: function() {
                      
                      var self = this;
                      
                      // in case the tooltip has been removed from DOM manually
          Severity: Major
          Found in skin/js/src/lib/jquery.tooltipster.js - About 1 day to fix

            Function token has 201 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Lexer.prototype.token = function(src, top) {
              var src = src.replace(/^ +$/gm, '')
                , next
                , loose
                , cap
            Severity: Major
            Found in epiceditor/js/epiceditor.js - About 1 day to fix

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

                  public function search($term)
                  {
                      $terms = explode(" ", $term);
              
                      $searchQuery = array();
              Severity: Major
              Found in code/Model/User.php and 1 other location - About 6 hrs to fix
              code/Model/Post.php on lines 216..245

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

              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 fetchByTerm($term)
                  {
                      $terms = explode(" ", $term);
              
                      $searchQuery = array();
              Severity: Major
              Found in code/Model/Post.php and 1 other location - About 6 hrs to fix
              code/Model/User.php on lines 343..372

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

              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

              Model_User has 47 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class Model_User extends Model_Record
              {
                  protected $_data;
                  protected $_lastPost;
              
              
              Severity: Minor
              Found in code/Model/User.php - About 6 hrs to fix

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

                      for (i = 0; i < item.align.length; i++) {
                        if (/^ *-+: *$/.test(item.align[i])) {
                          item.align[i] = 'right';
                        } else if (/^ *:-+: *$/.test(item.align[i])) {
                          item.align[i] = 'center';
                Severity: Major
                Found in epiceditor/js/epiceditor.js and 1 other location - About 6 hrs to fix
                epiceditor/js/epiceditor.js on lines 2057..2067

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

                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

                      for (i = 0; i < item.align.length; i++) {
                        if (/^ *-+: *$/.test(item.align[i])) {
                          item.align[i] = 'right';
                        } else if (/^ *:-+: *$/.test(item.align[i])) {
                          item.align[i] = 'center';
                Severity: Major
                Found in epiceditor/js/epiceditor.js and 1 other location - About 6 hrs to fix
                epiceditor/js/epiceditor.js on lines 2217..2227

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

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

                var GMapsLatLonPicker = (function() {
                
                    var _self = this;
                
                    ///////////////////////////////////////////////////////////////////////////////////////////////
                Severity: Major
                Found in skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js - About 6 hrs to fix

                  Function _showNow has 134 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          _showNow: function(callback) {
                              
                              var self = this;
                              
                              // call our constructor custom function before continuing
                  Severity: Major
                  Found in skin/js/src/lib/jquery.tooltipster.js - About 5 hrs to fix

                    Function EpicEditor has 132 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      function EpicEditor(options) {
                        // Default settings will be overwritten/extended by options arg
                        var self = this
                          , opts = options || {}
                          , _defaultFileSchema
                    Severity: Major
                    Found in epiceditor/js/epiceditor.js - About 5 hrs to fix

                      Function tok has 128 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Parser.prototype.tok = function() {
                        switch (this.token.type) {
                          case 'space': {
                            return '';
                          }
                      Severity: Major
                      Found in epiceditor/js/epiceditor.js - About 5 hrs to fix

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

                                    $(document).bind("gllp_update_fields", function(event) {
                                        var lat = $(_self.vars.cssID + ".profile-map-latitude").val();
                                        var lng = $(_self.vars.cssID + ".profile-map-longitude").val();
                                        var latlng = new google.maps.LatLng(lat, lng);
                                        _self.vars.map.setZoom( parseInt( $(_self.vars.cssID + ".profile-map-zoom").val() ) );
                        Severity: Major
                        Found in skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js and 1 other location - About 5 hrs to fix
                        skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js on lines 200..206

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

                        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

                                    $(_self.vars.cssID + ".gllpUpdateButton").bind("click", function() {
                                        var lat = $(_self.vars.cssID + ".profile-map-latitude").val();
                                        var lng = $(_self.vars.cssID + ".profile-map-longitude").val();
                                        var latlng = new google.maps.LatLng(lat, lng);
                                        _self.vars.map.setZoom( parseInt( $(_self.vars.cssID + ".profile-map-zoom").val() ) );
                        Severity: Major
                        Found in skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js and 1 other location - About 5 hrs to fix
                        skin/js/jquery.latLngPicker/js/jquery-gmaps-latlon-picker.js on lines 219..225

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

                        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

                        Model_Post has 36 functions (exceeds 20 allowed). Consider refactoring.
                        Open

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

                          Function output has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          InlineLexer.prototype.output = function(src) {
                            var out = ''
                              , link
                              , text
                              , href
                          Severity: Major
                          Found in epiceditor/js/epiceditor.js - About 4 hrs to fix

                            File User.php has 301 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            class Model_User extends Model_Record
                            {
                                protected $_data;
                            Severity: Minor
                            Found in code/Model/User.php - About 3 hrs to fix
                              Severity
                              Category
                              Status
                              Source
                              Language