codefordayton/metroparks-tribute

View on GitHub

Showing 5,402 of 5,402 total issues

Function build_calendar_and_list_view has 152 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function build_calendar_and_list_view(theMonth, theYear) {
      var calendarBuild = '',
          listViewBuild = '<div id="insivia-frmp-list-view"><div class="insivia-frmp-list-view-filters insivia-frmp-filter"></div><div class="insivia-frmp-list-view-wrapper"><!--<div class="insivia-frmp-list-nav-wrapper insivia-frmp-row"><span class="insivia-frmp-list-nav list-prev"><a href="#">&lt;</a></span><span class="insivia-frmp-list-nav list-next"><a href="#">&gt;</a></span></div>--><ul class="insivia-frmp-list-view-days">',
          formBuild = '',
          daysArray = days_in_month(theMonth, theYear),
Severity: Major
Found in tribute_files/insivia-frmp-script.js - About 6 hrs to fix

    Function _initonce has 147 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _initonce: function (el) {
                var $el = $(el);
                var $body = $('body');
                var $wrapper;
                var options = $el.data('popupoptions');
    Severity: Major
    Found in tribute_files/popup.js - About 5 hrs to fix

      Function init has 143 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Video.prototype.init = function() {
              var _this = this;
      
              // Event triggered when video url found without poster
              _this.core.$el.on('hasVideo.lg.tm', function(event, index, src, html) {
      Severity: Major
      Found in tribute_files/lightgallery.min.js - About 5 hrs to fix

        Function the_cart has 136 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function the_cart(programsSessionID, facilitiesSessionID) {
                    
              var url1 = baseUrl,
                  url2 = baseUrl,
                  programCartItems = '<div id="insivia-frmp-program-cart"><h2 class="cart-sub-title">Registrations</h2><ul class="cart-list">',
        Severity: Major
        Found in tribute_files/insivia-frmp-script.js - About 5 hrs to fix

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

              function faux_pagination(keyword) {
                var browserURL = window.location.href,
                    apiURL = "https://reservations.metroparks.org/api/v1/programs/?keyword=",
                    url, pages,
                    alreadyPaged = $('.nav-links .page-numbers');
          Severity: Major
          Found in tribute_files/insivia-frmp-script.js - About 5 hrs to fix

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

                if(window.location.hash) {
                  var hash = window.location.hash.substr(1);
                  jQuery('.rental-collapse-area').each(function() {
                    if(jQuery(this).attr('id') === hash) {
                      jQuery(this).addClass('open');
            Severity: Major
            Found in tribute_files/main.js and 1 other location - About 5 hrs to fix
            tribute_files/main.js on lines 607..617

            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

                if(window.location.hash) {
                  var hash = window.location.hash.substr(1);
                  jQuery('.rental-collapse-area').each(function() {
                    if(jQuery(this).attr('id') === hash) {
                      jQuery(this).addClass('open');
            Severity: Major
            Found in tribute_files/main.js and 1 other location - About 5 hrs to fix
            tribute_files/main.js on lines 846..856

            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

                          if(typeof prices == 'object') {
                            if( prices.length ) {
                              $.each( prices, function(i, val){
                                if(prices[i]) {
                                  formTitle = '<h3>'+ prices[i].description +' $'+ prices[i].price +'</h3>';
            Severity: Major
            Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
            tribute_files/insivia-frmp-script.js on lines 2552..2567

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

            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(typeof prices == 'object') {
                            if( prices.length ) {
                              $.each( prices, function(i, val){
                                if(prices[i]) {
                                  formTitle = '<h3>'+ prices[i].description +' $'+ prices[i].price +'</h3>';
            Severity: Major
            Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
            tribute_files/insivia-frmp-script.js on lines 2532..2547

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

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

                    show: function (el, ordinal) {
                        var $el = $(el);
            
                        if ($el.data('popup-visible')) return;
            
            
            Severity: Major
            Found in tribute_files/popup.js - About 4 hrs to fix

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

                            for( var i = 0; i <= promises.length; ++i) {
                              if(promises[i]) {
                                for( var j = 0; j <= promises[i].responseJSON.programs.length; ++j) {
                                  if( promises[i].responseJSON.programs[j] ) {
                                    programs.push(promises[i].responseJSON.programs[j]);
              Severity: Major
              Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
              tribute_files/insivia-frmp-script.js on lines 849..857
              tribute_files/insivia-frmp-script.js on lines 2805..2813

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

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

                        for( var i = 0; i <= promises.length; ++i) {
                          if(promises[i]) {
                            for( var j = 0; j <= promises[i].responseJSON.programs.length; ++j) {
                              if( promises[i].responseJSON.programs[j] ) {
                                programs.push(promises[i].responseJSON.programs[j]);
              Severity: Major
              Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
              tribute_files/insivia-frmp-script.js on lines 417..425
              tribute_files/insivia-frmp-script.js on lines 849..857

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

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

                      $dot.bind_events = function()
                      {
                          $dot.bind(
                              'update.dot',
                              function( e, c )
              Severity: Major
              Found in tribute_files/dotdot.js - About 4 hrs to fix

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

                          for( var i = 0; i <= promises.length; ++i) {
                            if(promises[i]) {
                              for( var j = 0; j <= promises[i].responseJSON.programs.length; ++j) {
                                if( promises[i].responseJSON.programs[j] ) {
                                  programs.push(promises[i].responseJSON.programs[j]);
                Severity: Major
                Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                tribute_files/insivia-frmp-script.js on lines 417..425
                tribute_files/insivia-frmp-script.js on lines 2805..2813

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

                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

                                        cartItemDisplayDay = ( (new Date(promises[i].responseJSON.cart[j].date).getDay()+1) == 7 ) ? dotwArray[new Date(promises[i].responseJSON.cart[j].date).getDay()] : dotwArray[new Date(promises[i].responseJSON.cart[j].date).getDay()+1];
                Severity: Major
                Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                tribute_files/insivia-frmp-script.js on lines 3705..3705

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

                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

                                        cartItemDisplayDay = ( (new Date(promises[i].responseJSON.cart[j].start_date).getDay()+1) == 7 ) ? dotwArray[new Date(promises[i].responseJSON.cart[j].start_date).getDay()] : dotwArray[new Date(promises[i].responseJSON.cart[j].start_date).getDay()+1];
                Severity: Major
                Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                tribute_files/insivia-frmp-script.js on lines 3721..3721

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

                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

                  function swiperHover() {
                    jQuery('.swiper-container').hover(function(){
                      jQuery('.swiper-button-next').addClass('hover');
                      jQuery('.swiper-button-prev').addClass('hover');
                      mySwiper.stopAutoplay();
                Severity: Major
                Found in tribute_files/main.js and 1 other location - About 4 hrs to fix
                tribute_files/main.js on lines 73..85

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

                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

                    function swiperHover() {
                      jQuery('.swiper-container').hover(function(){
                        jQuery('.swiper-button-next').addClass('hover');
                        jQuery('.swiper-button-prev').addClass('hover');
                        mySwiper.stopAutoplay();
                Severity: Major
                Found in tribute_files/main.js and 1 other location - About 4 hrs to fix
                tribute_files/main.js on lines 669..681

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

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

                              if(programs[k].tags) {
                                for(var l = 0; l <= programs[k].tags.length; ++l) {
                                  if(programs[k].tags[l]) {
                                    if(programs[k].tags[l].marketing_color) {
                                      series_color += ' series-'+programs[k].tags[l].marketing_color;
                Severity: Major
                Found in tribute_files/insivia-frmp-script.js and 2 other locations - About 4 hrs to fix
                tribute_files/insivia-frmp-script.js on lines 1290..1298
                tribute_files/insivia-frmp-script.js on lines 1952..1960

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

                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( query.indexOf('permits=&') == -1 ) {
                          query = query.split('&');
                          //if has permits
                          for(var i = 0; i <= query.length; ++i) {
                            if(query[i].indexOf('permits')>-1) {
                Severity: Major
                Found in tribute_files/insivia-frmp-script.js and 1 other location - About 4 hrs to fix
                tribute_files/insivia-frmp-script.js on lines 2772..2784

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

                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