CaffGeek/MBACNationals

View on GitHub

Showing 7,504 of 7,504 total issues

Method get_site_by_path has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function get_site_by_path( $domain, $path, $segments = null ) {
    global $wpdb;

    $path_segments = array_filter( explode( '/', trim( $path, '/' ) ) );

Severity: Minor
Found in Web.Admin/2014/wordpress/wp-includes/ms-load.php - About 1 hr to fix

    Method add_option has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) {
        global $wpdb;
    
        wp_protect_special_option( $name );
        $safe_name = esc_sql( $name );
    Severity: Minor
    Found in Web.Admin/2014/wordpress/wp-includes/functions.php - About 1 hr to fix

      Function ngOnChanges has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        ngOnChanges(changes: any): void {
          if (!(changes?.stat || changes?.year || changes?.game || changes?.division)) {
            return;
          }
      
      

        Method setup_postdata has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function setup_postdata($post) {
            global $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages;
        
            $id = (int) $post->ID;
        
        
        Severity: Minor
        Found in Web.Admin/2014/wordpress/wp-includes/query.php - About 1 hr to fix

          Method BackupTable has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public string BackupTable(string typeName)
                  {
                      var originalTable = GetTableFor(typeName);
          
                      TableContinuationToken token = null;
          Severity: Minor
          Found in AzureTableHelper/AzureTableHelper.cs - About 1 hr to fix

            Method Handle has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public void Handle(RoomTypeChanged e)
                    {
                        var tournament = GetTournamentFromContingentId(e.Id);
            
                        var contingentRooms = tournament.ContingentRooms.FirstOrDefault(x => x.Id == e.Id);
            Severity: Minor
            Found in ReadModels/ContingentTravelPlanQueries.cs - About 1 hr to fix

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

                          <?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
                              <?php
                              $args['walker'] = $walker;
                              echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args );
                              ?>
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php and 1 other location - About 1 hr to fix
              Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php on lines 753..762

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

              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 ($p_entry['status'] == "aborted") {
                      $p_entry['status'] = "skipped";
                    }
              
                  // ----- Look for post-extract callback
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php and 1 other location - About 1 hr to fix
              Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php on lines 4117..4137

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

              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

                  function get_txp_posts()
                  {
                      // General Housekeeping
                      $txpdb = new wpdb(get_option('txpuser'), get_option('txppass'), get_option('txpname'), get_option('txphost'));
                      set_magic_quotes_runtime(0);
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/import/textpattern.php and 2 other locations - About 1 hr to fix
              Web.Admin/2014/wordpress/wp-admin/import/dotclear.php on lines 166..174
              Web.Admin/2014/wordpress/wp-admin/import/textpattern.php on lines 153..169

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

              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 ($p_entry['status'] == "aborted") {
                    $p_entry['status'] = "skipped";
                  }
              
                  // ----- Look for post-extract callback
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php and 1 other location - About 1 hr to fix
              Web.Admin/2014/wordpress/wp-admin/includes/class-pclzip.php on lines 3929..3949

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

              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

                          <?php if ( ! empty( $search_results ) && ! is_wp_error( $search_results ) ) : ?>
                              <?php
                              $args['walker'] = $walker;
                              echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $search_results), 0, (object) $args );
                              ?>
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php and 1 other location - About 1 hr to fix
              Web.Admin/2014/wordpress/wp-admin/includes/nav-menu.php on lines 1010..1019

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

              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

                  function get_dc_links()
                  {
                      //General Housekeeping
                      $dcdb = new wpdb(get_option('dcuser'), get_option('dcpass'), get_option('dcname'), get_option('dchost'));
                      set_magic_quotes_runtime(0);
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/import/dotclear.php and 2 other locations - About 1 hr to fix
              Web.Admin/2014/wordpress/wp-admin/import/textpattern.php on lines 115..139
              Web.Admin/2014/wordpress/wp-admin/import/textpattern.php on lines 153..169

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

              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

                      function get_txp_links()
                  {
                      //General Housekeeping
                      $txpdb = new wpdb(get_option('txpuser'), get_option('txppass'), get_option('txpname'), get_option('txphost'));
                      set_magic_quotes_runtime(0);
              Severity: Major
              Found in Web.Admin/2014/wordpress/wp-admin/import/textpattern.php and 2 other locations - About 1 hr to fix
              Web.Admin/2014/wordpress/wp-admin/import/dotclear.php on lines 166..174
              Web.Admin/2014/wordpress/wp-admin/import/textpattern.php on lines 115..139

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

              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

                              yield return new ParticipantGuestPackageChanged
                              {
                                  Id = command.Id,
                                  ManitobaDinner = command.Package.ManitobaDinner,
                                  ManitobaDance = command.Package.ManitobaDance,
              Severity: Major
              Found in Aggregates/Participant/ParticipantCommandHandlers.cs and 1 other location - About 1 hr to fix
              Aggregates/Participant/ParticipantCommandHandlers.cs on lines 71..82

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

              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 contingents = Contingents.Where(x => x.TournamentId == tournamentId);
                          var teams = Teams
                              .Where(x => contingents.Any(c => c.Id == x.ContingentId) && x.Division == division)
                              .ToList();
              Severity: Major
              Found in ReadModels/StandingQueries.cs and 1 other location - About 1 hr to fix
              ReadModels/ReservationQueries.cs on lines 73..81

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

              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 contingents = Contingents.Where(x => x.Year == year);
              
                          var participants = Participants
                              .Where(x => contingents.Any(c => c.Id == x.ContingentId) && x.Province == province)
              Severity: Major
              Found in ReadModels/ReservationQueries.cs and 1 other location - About 1 hr to fix
              ReadModels/StandingQueries.cs on lines 85..92

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

              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

                              yield return new ParticipantGuestPackageChanged
                              {
                                  Id = command.Id,
                                  ManitobaDinner = command.Package.ManitobaDinner,
                                  ManitobaDance = command.Package.ManitobaDance,
              Severity: Major
              Found in Aggregates/Participant/ParticipantCommandHandlers.cs and 1 other location - About 1 hr to fix
              Aggregates/Participant/ParticipantCommandHandlers.cs on lines 199..210

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

              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

                      next : function() { // get next vector position and clean old ones
                          if(this.pos>20) this.history[this.pos-21] = undefined;
                          return ++this.pos;
                      }
              Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 296..299
              Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 252..255

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

              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

                      next : function() { // get next vector position and clean old ones
                          if(this.pos>20) this.history[this.pos-21] = undefined;
                          return ++this.pos;
                      }
              Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 285..288
              Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/msie.js on lines 296..299

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

              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

                      next : function() { // get next vector position and clean old ones
                          if(this.pos>20) this.history[this.pos-21] = undefined;
                          return ++this.pos;
                      }
              Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/gecko.js on lines 285..288
              Web.Admin/2014/wordpress/wp-includes/js/codepress/engines/opera.js on lines 252..255

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

              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