codefordayton/metroparks-tribute

View on GitHub

Showing 5,402 of 5,402 total issues

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

                  } else if( currentDay >= apr1 && currentDay <= oct31 ) {
                    //Apr 1 - Oct 31
                    if( $('#date-'+json.dates[i].date).attr('class') ) {
                      ( $('#date-'+json.dates[i].date).attr('class').indexOf('saturday')>-1 || $('#date-'+json.dates[i].date).attr('class').indexOf('sunday')>-1 ) ? $('#date-'+json.dates[i].date+' .insivia-frmp-calendar-day-events').html('<li class="starting-at">Starting at $'+json.facility.rental_rates.rental_rates[1].weekend_cost+'</li>') : $('#date-'+json.dates[i].date+' .insivia-frmp-calendar-day-events').html('<li class="starting-at">Starting at $'+json.facility.rental_rates.rental_rates[1].weekday_cost+'</li>');
                    }
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
tribute_files/insivia-frmp-script.js on lines 3297..3312

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

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

                      $(this).find('ul.insivia-frmp-list-view-event-list').append('<li id="list-item-' + slugify(programs[k].title) + '-'+programs[k].begin_date+'" class="insivia-frmp-event">'+series+'<span class="insivia-frmp-event-title blue">' + '<a href="#' + slugify(programs[k].title) + '" class="popup-btn blue" data-api="'+programAPI+'" data-id="'+programs[k].program_number+'" data-type="program">' + programs[k].title + '</a>' + '</span>' + '<div class="insivia-frmp-list-view-event-bottom insivia-frmp-row">' + '<div class="insivia-frmp-list-view-event-left insivia-col-2">' + '<ul class="insivia-frmp-list-view-event-info-list">' + '<li class="insivia-frmp-list-view-event-info-item">' + '<span class="insivia-frmp-list-view-location-name">' + '<strong>' + programs[k].location_name + '</strong>' + '</span> | ' + '<span class="insivia-frmp-list-view-event-time">' + '<span class="insivia-frmp-list-view-event-start-time">' + start + '</span>' + ' - <span class="insivia-frmp-list-view-event-end-time">' + end + '</span>' + '</span>' + '</li>' + '<li class="insivia-frmp-list-view-event-info-item">' + '<strong><span class="insivia-frmp-list-view-ages">AGE: ' + displayAges + '</span> | ' + '<span class="insivia-frmp-list-view-price">' + displayPrice + '</span></strong>' + '</li>' + '</ul>' + '</div>' + '<div class="insivia-frmp-list-view-event-right insivia-col-2">' + '<div class="insivia-frmp-list-view-content">' + cancellation +trim_string(programs[k].description, 25) + '</div>' + '</div>' + '</div>' + '</li>');
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
tribute_files/insivia-frmp-script.js on lines 1317..1317

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

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

                          $(this).find('ul.insivia-frmp-list-view-event-list').append('<li id="list-item-' + slugify(programs[k].title) + '-'+programs[k].begin_date+'" class="insivia-frmp-event">'+series+'<span class="insivia-frmp-event-title blue">' + '<a href="#' + slugify(programs[k].title) + '" class="popup-btn blue" data-api="'+programAPI+'" data-id="'+programs[k].program_number+'" data-type="program">' + programs[k].title + '</a>' + '</span>' + '<div class="insivia-frmp-list-view-event-bottom insivia-frmp-row">' + '<div class="insivia-frmp-list-view-event-left insivia-col-2">' + '<ul class="insivia-frmp-list-view-event-info-list">' + '<li class="insivia-frmp-list-view-event-info-item">' + '<span class="insivia-frmp-list-view-location-name">' + '<strong>' + programs[k].location_name + '</strong>' + '</span> | ' + '<span class="insivia-frmp-list-view-event-time">' + '<span class="insivia-frmp-list-view-event-start-time">' + start + '</span>' + ' - <span class="insivia-frmp-list-view-event-end-time">' + end + '</span>' + '</span>' + '</li>' + '<li class="insivia-frmp-list-view-event-info-item">' + '<strong><span class="insivia-frmp-list-view-ages">AGE: ' + displayAges + '</span> | ' + '<span class="insivia-frmp-list-view-price">' + displayPrice + '</span></strong>' + '</li>' + '</ul>' + '</div>' + '<div class="insivia-frmp-list-view-event-right insivia-col-2">' + '<div class="insivia-frmp-list-view-content">' + cancellation+' '+trim_string(programs[k].description, 25) + '</div>' + '</div>' + '</div>' + '</li>');
Severity: Major
Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
tribute_files/insivia-frmp-script.js on lines 892..892

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

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

    accordArea.children('h4').click(function(){
      if(!jQuery(this).parent().hasClass('open')) {
        jQuery(this).parent().addClass('open');
        jQuery(this).parent().siblings().removeClass('open');
        var id = jQuery(this).parent().attr('id');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 day to fix
tribute_files/main.js on lines 427..442

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

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

    accordArea.children('h4').click(function(){
      if(!jQuery(this).parent().hasClass('open')) {
        jQuery(this).parent().addClass('open');
        jQuery(this).parent().siblings().removeClass('open');
        var id = jQuery(this).parent().attr('id');
Severity: Major
Found in tribute_files/main.js and 1 other location - About 1 day to fix
tribute_files/main.js on lines 858..873

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

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

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

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

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

Refactorings

Further Reading

File dotdot.js has 588 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 *    jQuery dotdotdot 1.7.4
 *
 *    Copyright (c) Fred Heusschen
 *    www.frebsite.nl
Severity: Major
Found in tribute_files/dotdot.js - About 1 day to fix

    File popup.js has 581 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * jQuery Popup Overlay
     *
     * @version 1.7.11
     * @requires jQuery v1.7.1+
    Severity: Major
    Found in tribute_files/popup.js - About 1 day to fix

      Function dotdotdot has 233 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $.fn.dotdotdot = function( o )
          {
              if ( this.length == 0 )
              {
                  $.fn.dotdotdot.debug( 'No element found for "' + this.selector + '".' );
      Severity: Major
      Found in tribute_files/dotdot.js - About 1 day to fix

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

                              cartItemStart = ( promises[i].responseJSON.cart[j].start_time.split(':')[0].charAt(0) == 0 ) ? promises[i].responseJSON.cart[j].start_time.split(':')[0].slice(1)+':'+promises[i].responseJSON.cart[j].start_time.split(':')[1] : promises[i].responseJSON.cart[j].start_time.split(':')[0]+':'+promises[i].responseJSON.cart[j].start_time.split(':')[1];
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
        tribute_files/insivia-frmp-script.js on lines 3699..3699

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

        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 = ( promises[i].responseJSON.cart[j].end_time.split(':')[0].charAt(0) == 0 ) ? promises[i].responseJSON.cart[j].end_time.split(':')[0].slice(1)+':'+promises[i].responseJSON.cart[j].end_time.split(':')[1] : promises[i].responseJSON.cart[j].end_time.split(':')[0]+':'+promises[i].responseJSON.cart[j].end_time.split(':')[1];
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
        tribute_files/insivia-frmp-script.js on lines 3697..3697

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

        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

                                    while(startVal <= endVal) {
                                      if(startVal < 12) {
                                        formBuild += '<option value="'+startVal+':00:00">'+startVal+':00 am</option>';
                                        formBuild += '<option value="'+startVal+':30:00">'+startVal+':30 am</option>';
                                      } else if(startVal == 12) {
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
        tribute_files/insivia-frmp-script.js on lines 3441..3453

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

        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

                                    while(startVal <= endVal) {
                                      if(startVal < 12) {
                                        formBuild += '<option value="'+startVal+':00:00">'+startVal+':00 am</option>';
                                        formBuild += '<option value="'+startVal+':30:00">'+startVal+':30 am</option>';
                                      } else if(startVal == 12) {
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
        tribute_files/insivia-frmp-script.js on lines 3477..3489

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

        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

                    $.each($('.number_registering'), function() {
            
                      $(this).on('change', function() {
                        var registering = $(this).val();
                        
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
        tribute_files/insivia-frmp-script.js on lines 2617..2628

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

        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

                $.each($('.number_registering'), function() {
                  $(this).on('change', function() {
                    var registering = $(this).val();
                    var targetID = $(this).closest('form').attr('id');            
                    var textArea = $('#'+targetID).children('textarea')[1];
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js and 1 other location - About 1 day to fix
        tribute_files/insivia-frmp-script.js on lines 1592..1607

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

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

        function initParkPage() {
          function expandParkDescription() {
              jQuery('.park-banner-description-button').click(function() {
                if(!jQuery(this).hasClass('open')) {
                  jQuery(this).addClass('open');
        Severity: Major
        Found in tribute_files/main.js - About 7 hrs to fix

          Function initNavigation has 189 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function initNavigation() {
              var mainNav, mainNavItems, mainNavLinks, submenu
              mainNav = jQuery('.main-nav');
              mainNavItems = mainNav.children();
              mainNavLinks = mainNavItems.children('p');
          Severity: Major
          Found in tribute_files/navigation.js - About 7 hrs to fix

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

                                if (youtubePlayer) {
                                    youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
                                } else if (vimeoPlayer) {
                                    try {
                                        $f(vimeoPlayer).api('play');
            Severity: Major
            Found in tribute_files/lightgallery.min.js and 1 other location - About 7 hrs to fix
            tribute_files/lightgallery.min.js on lines 177..198

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

            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 (youtubePlayer) {
                            youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
                        } else if (vimeoPlayer) {
                            try {
                                $f(vimeoPlayer).api('pause');
            Severity: Major
            Found in tribute_files/lightgallery.min.js and 1 other location - About 7 hrs to fix
            tribute_files/lightgallery.min.js on lines 128..149

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

            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 beginDate = programs[k].begin_date,
                                  start = to_am_pm(programs[k].start_time),
                                  end = to_am_pm(programs[k].end_time),
                                  displayAges = (programs[k].age_range.match(/^[0-9]+$/)) ? 'All ages' : programs[k].age_range,
                                  displayPrice = (programs[k].prices[0].price == '0.00') ? programs[k].prices[0].description : '$' + programs[k].prices[0].price,
            Severity: Major
            Found in tribute_files/insivia-frmp-script.js and 1 other location - About 6 hrs to fix
            tribute_files/insivia-frmp-script.js on lines 861..868

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

            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 beginDate = programs[k].begin_date,
                              start = to_am_pm(programs[k].start_time),
                              end = to_am_pm(programs[k].end_time),
                              displayAges = (programs[k].age_range.match(/^[0-9]+$/)) ? 'All ages' : programs[k].age_range,
                              displayPrice = (programs[k].prices[0].price == '0.00') ? programs[k].prices[0].description : '$' + programs[k].prices[0].price,
            Severity: Major
            Found in tribute_files/insivia-frmp-script.js and 1 other location - About 6 hrs to fix
            tribute_files/insivia-frmp-script.js on lines 1281..1288

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

            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