codefordayton/metroparks-tribute

View on GitHub

Showing 185 of 5,402 total issues

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

                        facilityCartItems += '<li data-id="'+promises[i].responseJSON.cart[j].facility_id+'" data-item-id="'+promises[i].responseJSON.cart[j].cart_item_id+'" class="cart-item insivia-frmp-row"><a href="#" class="blue cart-item-link">'+promises[i].responseJSON.cart[j].facility+'</a>'+
                                                '<span class="item-info insivia-frmp-row"><span class="cart-item-date">'+cartItemDisplayDay+', '+monthsArray[ new Date(promises[i].responseJSON.cart[j].date).getMonth() ]+' '+cartItemDate+', '+new Date(promises[i].responseJSON.cart[j].date).getFullYear()+'</span><span class="cart-item-time"><span class="start-time">'+cartItemStart+'</span> to <span class="end-time">'+cartItemEnd+'</span></span><span class="cart-item-price">$'+promises[i].responseJSON.cart[j].price+'</span>'+
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3710..3710

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

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

            var url = ( $(this).attr('data-api') == programAPI ) ? baseUrl+$(this).attr('data-api')+'/cart/'+$(this).attr('data-session')+'/delete?session_id='+$(this).attr('data-session')+'&price_id='+$(this).attr('data-price')+'&program_id='+$(this).attr('data-id')+'&access_token='+accessToken : baseUrl+$(this).attr('data-api')+'/cart/'+$(this).attr('data-session')+'/delete?session_id='+$(this).attr('data-session')+'&cart_item_id='+$(this).attr('data-id')+'&access_token='+accessToken;                        
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3761..3761

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

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

                      cartItemEnd = ( parseInt(cartItemEnd.split(':')[0]) > 12 ) ? (parseInt(cartItemEnd.split(':')[0])-12)+':'+cartItemEnd.split(':')[1]+'pm' : cartItemEnd+'am';
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3698..3698

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

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

                      cartItemStart = ( parseInt(cartItemStart.split(':')[0]) > 12 ) ? (parseInt(cartItemStart.split(':')[0])-12)+':'+cartItemStart.split(':')[1]+'pm' : cartItemStart+'am';
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3700..3700

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

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

          queryBuild += '&'+selectArray[i][(selectArray[i].length-1)]+'='+source.find('select[id*='+selectArray[i][(selectArray[i].length-1)]+']').val();
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 193..193

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

                 queryBuild += '&'+inputArray[i][(inputArray[i].length-2)]+'_'+inputArray[i][(inputArray[i].length-1)]+'='+source.find('input[id*='+inputArray[i][(inputArray[i].length-2)]+']').val() : queryBuild += '&'+inputArray[i][(inputArray[i].length-1)]+'='+source.find('input[id*='+inputArray[i][(inputArray[i].length-1)]+']').val();
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 183..183

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

              for (var i = 0; i < json.series.length; ++i) {
                options += '<option value="' + json.series[i].id + '">' + json.series[i].name + '</option>';
              }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 758..760

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

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(!jQuery(this).hasClass('open')) {
          jQuery(this).addClass('open'); 
          subaccordion.siblings('.general-content').addClass('open');
          mainTitle.siblings('.park-accordion-content').addClass('open');
          mainTitle.addClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 374..380

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

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 {
          jQuery(this).removeClass('open'); 
          subaccordion.siblings('.general-content').removeClass('open');
          mainTitle.siblings('.park-accordion-content').removeClass('open');
          mainTitle.removeClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 368..374

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

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; i < json.experiences.length; ++i) {
              options += '<option value="' + json.experiences[i].id + '">' + json.experiences[i].name + '</option>';
            }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 753..755

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

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 (window.location.href.indexOf("?footer-feedback-popup") > -1) {
    jQuery("html, body").animate({ scrollTop: jQuery(document).height() }, "slow");
    jQuery(".footer-contact-button").trigger("click");
  }
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 131..134

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

    amenityBtn.click(function(){
      activityBtn.removeClass('open');
      amenityBtn.removeClass('open');
      btn = jQuery(this);
      btnData = jQuery(this).attr("data-info-button");
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 236..242

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

    activityBtn.click(function(){
      activityBtn.removeClass('open');
      amenityBtn.removeClass('open');
      btn = jQuery(this);
      btnData = jQuery(this).attr("data-info-button");
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 226..232

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 (window.location.href.indexOf("?newsletter-email") > -1) {
    jQuery("html, body").animate({ scrollTop: jQuery(document).height() }, "slow");
    jQuery(".newsletter-submit-button").trigger("click");
  }
Severity: Major
Found in tribute_files/main.js and 1 other location - About 2 hrs to fix
tribute_files/main.js on lines 114..117

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

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

      for (var i = 0; i < daysArray[0].getDay(); ++i) {
        calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
        ++w;
      }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 949..952

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

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

      for (var i = 0; i < daysArray[0].getDay(); ++i) {
        calendarBuild += '<div class="insivia-frmp-calendar-' + dotwArray[w].toLowerCase() + ' insivia-frmp-calendar-week-' + i + ' insivia-frmp-calendar-day insivia-frmp-event-day insivia-col-7 inactive"></div>';
        ++w;
      }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 2 hrs to fix
tribute_files/insivia-frmp-script.js on lines 3207..3210

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

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

      if(!content.hasClass('open')) {
        content.addClass('open');
        jQuery(this).addClass('open');
      } else {
        content.removeClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 hr to fix
tribute_files/main.js on lines 346..352

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

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(!content.hasClass('open')) {
        content.addClass('open');
        jQuery(this).addClass('open');
      } else {
        content.removeClass('open');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 hr to fix
tribute_files/main.js on lines 358..364

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

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 6 locations. Consider refactoring.
Open

            $.each($('.reserve-now'), function() {
              $(this).click(function(e) {
                e.preventDefault();
                registration_calendar(currentDate, $(this).attr('data-id'));
              });
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
tribute_files/insivia-frmp-script.js on lines 1421..1426
tribute_files/insivia-frmp-script.js on lines 1564..1569
tribute_files/insivia-frmp-script.js on lines 2580..2585
tribute_files/insivia-frmp-script.js on lines 2592..2597
tribute_files/insivia-frmp-script.js on lines 3130..3135

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

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 6 locations. Consider refactoring.
Open

            $.each($('.reserve-now'), function() {
              $(this).click(function(e) {
                e.preventDefault();
                registration_calendar(currentDate, $(this).attr('data-id'));
              });
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 5 other locations - About 1 hr to fix
tribute_files/insivia-frmp-script.js on lines 1421..1426
tribute_files/insivia-frmp-script.js on lines 1452..1457
tribute_files/insivia-frmp-script.js on lines 1564..1569
tribute_files/insivia-frmp-script.js on lines 2580..2585
tribute_files/insivia-frmp-script.js on lines 2592..2597

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

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