CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

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

                fields: {
                    id: hotel.Id,
                    name: hotel.Name,
                    website: hotel.Website,
                    phonenumber: hotel.PhoneNumber,
Severity: Major
Found in Web.Admin/AdminApp/Services/service.data.js and 1 other location - About 1 hr to fix
Web.Admin/AdminApp/Controllers/controller.reports.js on lines 96..104

Duplicated Code

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

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

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

Tuning

This issue has a mass of 65.

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

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

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

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

Refactorings

Further Reading

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

            if (screen && screen.availWidth) {
                if ((this.x + this.width) > screen.availWidth) {
                    this.x = screen.availWidth - this.width;
                    }
                }
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js on lines 314..318

Duplicated Code

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

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

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

Tuning

This issue has a mass of 65.

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

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

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

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

Refactorings

Further Reading

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

                case 'vspace':
                    v = dom.getStyle(e, 'margin-top')
                    v2 = dom.getStyle(e, 'margin-bottom');
                    if (v && v == v2)
                        return parseInt(v.replace(/[^0-9]/g, ''));
Web.Admin/2014/wordpress/wp-includes/js/tinymce/themes/advanced/js/image.js on lines 182..188

Duplicated Code

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

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

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

Tuning

This issue has a mass of 65.

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

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

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

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

Refactorings

Further Reading

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

        } else {
            w1 = (h.val() != '') ? this.intval( h.val() * this.hold['xy_ratio'] ) : '';
            w.val( w1 );
        }
Severity: Major
Found in Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-admin/js/image-edit.dev.js on lines 74..77

Duplicated Code

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

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

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

Tuning

This issue has a mass of 65.

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

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

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

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

Refactorings

Further Reading

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

            if (screen && screen.availHeight) {
                if ((this.y + this.height) > screen.availHeight) {
                    this.y = screen.availHeight - this.height;
                    }
                }
Severity: Major
Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js and 1 other location - About 1 hr to fix
Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js on lines 319..323

Duplicated Code

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

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

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

Tuning

This issue has a mass of 65.

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

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

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

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

Refactorings

Further Reading

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

    function _readEntryAsFiles(entry, callback){
        if( !entry ){
            // error
            callback('invalid entry');
        }
Severity: Minor
Found in Web.Admin/z-scripts/FileAPI.js - About 1 hr to fix

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

      this.$get = function() {
        var $log = {
          log: function() { $log.log.logs.push(concat([], arguments, 0)); },
          warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
          info: function() { $log.info.logs.push(concat([], arguments, 0)); },
    Severity: Minor
    Found in Web.Admin/z-scripts/angular-mocks.js - About 1 hr to fix

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

                  function AppInsights(config) {
                      var _this = this;
                      this.config = config || {};
                      var defaults = AppInsights.defaultConfig;
                      if (defaults !== undefined) {
      Severity: Minor
      Found in Web.Admin/z-scripts/ai.0.15.0-build46802.js - About 1 hr to fix

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

                refresh: function() {
                    var self = this;
        
                    this.abort();
        
        
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-admin/js/customize-controls.js - About 1 hr to fix

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

              get : function(total, num) {
                  var st = this.st, data;
                  if ( ! num )
                      num = 20;
          
          
          Severity: Minor
          Found in Web.Admin/2014/wordpress/wp-admin/js/post.dev.js - About 1 hr to fix

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

                    _addListeners: function() {
                        var self = this;
            
                        self.toggler.click( function( event ){
                            event.stopPropagation();
            Severity: Minor
            Found in Web.Admin/2014/wordpress/wp-admin/js/color-picker.js - About 1 hr to fix

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

                      _setupRemoveUI: function() {
                          var self = this, $removeBtn, replaceDeleteWithRemove;
              
                          // Configure remove button
                          $removeBtn = this.container.find( 'a.widget-control-remove' );
              Severity: Minor
              Found in Web.Admin/2014/wordpress/wp-admin/js/customize-widgets.js - About 1 hr to fix

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

                function getAnchorPosition(anchorname) {
                    // This function will return an Object with x and y properties
                    var useWindow=false;
                    var coordinates=new Object();
                    var x=0,y=0;
                Severity: Minor
                Found in Web.Admin/2014/wordpress/wp-includes/js/colorpicker.dev.js - About 1 hr to fix

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

                          createStates: function() {
                              this.states.add([
                                  new media.controller.VideoDetails({
                                      media: this.media
                                  }),
                  Severity: Minor
                  Found in Web.Admin/2014/wordpress/wp-includes/js/media-audiovideo.js - About 1 hr to fix

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

                    Cropper.Img.prototype={initialize:function(_7,_8){
                    this.options=Object.extend({ratioDim:{x:0,y:0},minWidth:0,minHeight:0,displayOnInit:false,onEndCrop:Prototype.emptyFunction,captureKeys:true},_8||{});
                    if(this.options.minWidth>0&&this.options.minHeight>0){
                    this.options.ratioDim.x=this.options.minWidth;
                    this.options.ratioDim.y=this.options.minHeight;
                    Severity: Minor
                    Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

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

                      },drawArea:function(){
                      if(!this.isIE){
                      Element.show($(this.overlay));
                      }
                      var _3e=this.calcW();
                      Severity: Minor
                      Found in Web.Admin/2014/wordpress/wp-includes/js/crop/cropper.js - About 1 hr to fix

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

                          setup: function(){
                            function parseColor(color){
                              if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
                              color = color.parseColor();
                              return $R(0,2).map(function(i){
                        Severity: Minor
                        Found in Web.Admin/2014/wordpress/wp-includes/js/scriptaculous/effects.js - About 1 hr to fix

                          Method media_upload_type_form has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function media_upload_type_form($type = 'file', $errors = null, $id = null) {
                              media_upload_header();
                          
                              $post_id = intval($_REQUEST['post_id']);
                          
                          
                          Severity: Minor
                          Found in Web.Admin/2014/wordpress/wp-admin/includes/media.php - About 1 hr to fix

                            Method get_views has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function get_views() {
                                    global $totals, $status;
                            
                                    $status_links = array();
                                    foreach ( $totals as $type => $count ) {

                              Method render_per_page_options has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  function render_per_page_options() {
                                      if ( ! $this->get_option( 'per_page' ) )
                                          return;
                              
                                      $per_page_label = $this->get_option( 'per_page', 'label' );
                              Severity: Minor
                              Found in Web.Admin/2014/wordpress/wp-admin/includes/screen.php - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language