wikimedia/mediawiki-core

View on GitHub
includes/specialpage/ChangesListSpecialPage.php

Summary

Maintainability
F
1 wk
Test Coverage

File ChangesListSpecialPage.php has 1321 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
Severity: Major
Found in includes/specialpage/ChangesListSpecialPage.php - About 3 days to fix

    Method __construct has 462 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function __construct(
            $name,
            $restriction,
            UserIdentityUtils $userIdentityUtils,
            TempUserConfig $tempUserConfig
    Severity: Major
    Found in includes/specialpage/ChangesListSpecialPage.php - About 2 days to fix

      ChangesListSpecialPage has 57 functions (exceeds 20 allowed). Consider refactoring.
      Open

      abstract class ChangesListSpecialPage extends SpecialPage {
      
          /** @var string */
          protected $rcSubpage;
      
      
      Severity: Major
      Found in includes/specialpage/ChangesListSpecialPage.php - About 1 day to fix

        Method makeLegend has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function makeLegend() {
                $context = $this->getContext();
                $user = $context->getUser();
                # The legend showing what the letters and stuff mean
                $legend = Html::openElement( 'dl' ) . "\n";
        Severity: Major
        Found in includes/specialpage/ChangesListSpecialPage.php - About 2 hrs to fix

          Function areFiltersInConflict has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

              protected function areFiltersInConflict() {
                  $opts = $this->getOptions();
                  foreach ( $this->getFilterGroups() as $group ) {
                      if ( $group->getConflictingGroups() ) {
                          wfLogWarning(
          Severity: Minor
          Found in includes/specialpage/ChangesListSpecialPage.php - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Method execute has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function execute( $subpage ) {
                  $this->rcSubpage = $subpage;
          
                  if ( $this->considerActionsForDefaultSavedQuery( $subpage ) ) {
                      // Don't bother rendering the page if we'll be performing a redirect (T330100).
          Severity: Major
          Found in includes/specialpage/ChangesListSpecialPage.php - About 2 hrs to fix

            Method registerFilters has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function registerFilters() {
                    $this->registerFiltersFromDefinitions( $this->filterGroupDefinitions );
            
                    // Make sure this is not being transcluded (we don't want to show this
                    // information to all users just because the user that saves the edit can
            Severity: Major
            Found in includes/specialpage/ChangesListSpecialPage.php - About 2 hrs to fix

              Function parseParameters has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function parseParameters( $par, FormOptions $opts ) {
                      $stringParameterNameSet = [];
                      $hideParameterNameSet = [];
              
                      // URL parameters can be per-group, like 'userExpLevel',
              Severity: Minor
              Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function execute has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function execute( $subpage ) {
                      $this->rcSubpage = $subpage;
              
                      if ( $this->considerActionsForDefaultSavedQuery( $subpage ) ) {
                          // Don't bother rendering the page if we'll be performing a redirect (T330100).
              Severity: Minor
              Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Method includeRcFiltersApp has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function includeRcFiltersApp() {
                      $out = $this->getOutput();
                      if ( $this->isStructuredFilterUiEnabled() && !$this->including() ) {
                          $jsData = $this->getStructuredFilterJsData();
                          $messages = [];
              Severity: Minor
              Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                Function buildQuery has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function buildQuery( &$tables, &$fields, &$conds, &$query_options,
                        &$join_conds, FormOptions $opts
                    ) {
                        $dbr = $this->getDB();
                        $isStructuredUI = $this->isStructuredFilterUiEnabled();
                Severity: Minor
                Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Function fixContradictoryOptions has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function fixContradictoryOptions( FormOptions $opts ) {
                        $fixed = $this->fixBackwardsCompatibilityOptions( $opts );
                
                        foreach ( $this->filterGroups as $filterGroup ) {
                            if ( $filterGroup instanceof ChangesListBooleanFilterGroup ) {
                Severity: Minor
                Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                Cognitive Complexity

                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                A method's cognitive complexity is based on a few simple rules:

                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                • Code is considered more complex for each "break in the linear flow of the code"
                • Code is considered more complex when "flow breaking structures are nested"

                Further reading

                Method buildQuery has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function buildQuery( &$tables, &$fields, &$conds, &$query_options,
                        &$join_conds, FormOptions $opts
                    ) {
                        $dbr = $this->getDB();
                        $isStructuredUI = $this->isStructuredFilterUiEnabled();
                Severity: Minor
                Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                  Method considerActionsForDefaultSavedQuery has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      protected function considerActionsForDefaultSavedQuery( $subpage ) {
                          if ( !$this->isStructuredFilterUiEnabled() || $this->including() ) {
                              return false;
                          }
                  
                  
                  Severity: Minor
                  Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                    Method filterOnUserExperienceLevel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function filterOnUserExperienceLevel( $specialPageClassName, $context, $dbr,
                            &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedExpLevels, $now = 0
                        ) {
                            $selected = array_fill_keys( $selectedExpLevels, true );
                    
                    
                    Severity: Minor
                    Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                      Method filterOnUserExperienceLevel has 10 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function filterOnUserExperienceLevel( $specialPageClassName, $context, $dbr,
                              &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedExpLevels, $now = 0
                      Severity: Major
                      Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                        Method replaceOldOptions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function replaceOldOptions( FormOptions $opts ) {
                                if ( !$this->isStructuredFilterUiEnabled() ) {
                                    return false;
                                }
                        
                        
                        Severity: Minor
                        Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                          Function considerActionsForDefaultSavedQuery has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              protected function considerActionsForDefaultSavedQuery( $subpage ) {
                                  if ( !$this->isStructuredFilterUiEnabled() || $this->including() ) {
                                      return false;
                                  }
                          
                          
                          Severity: Minor
                          Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function getLegacyShowHideFilters has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              protected function getLegacyShowHideFilters() {
                                  $filters = [];
                                  foreach ( $this->filterGroups as $group ) {
                                      if ( $group instanceof ChangesListBooleanFilterGroup ) {
                                          foreach ( $group->getFilters() as $key => $filter ) {
                          Severity: Minor
                          Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                              protected function doMainQuery( $tables, $fields, $conds,
                                  $query_options, $join_conds, FormOptions $opts
                              ) {
                                  $rcQuery = RecentChange::getQueryInfo();
                                  $tables = array_merge( $tables, $rcQuery['tables'] );
                          Severity: Minor
                          Found in includes/specialpage/ChangesListSpecialPage.php - About 1 hr to fix

                            Function replaceOldOptions has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function replaceOldOptions( FormOptions $opts ) {
                                    if ( !$this->isStructuredFilterUiEnabled() ) {
                                        return false;
                                    }
                            
                            
                            Severity: Minor
                            Found in includes/specialpage/ChangesListSpecialPage.php - About 45 mins to fix

                            Cognitive Complexity

                            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                            A method's cognitive complexity is based on a few simple rules:

                            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                            • Code is considered more complex for each "break in the linear flow of the code"
                            • Code is considered more complex when "flow breaking structures are nested"

                            Further reading

                            Method buildQuery has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                protected function buildQuery( &$tables, &$fields, &$conds, &$query_options,
                                    &$join_conds, FormOptions $opts
                            Severity: Minor
                            Found in includes/specialpage/ChangesListSpecialPage.php - About 45 mins to fix

                              Method runMainQueryHook has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  protected function runMainQueryHook( &$tables, &$fields, &$conds,
                                      &$query_options, &$join_conds, $opts
                              Severity: Minor
                              Found in includes/specialpage/ChangesListSpecialPage.php - About 45 mins to fix

                                Method doMainQuery has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    protected function doMainQuery( $tables, $fields, $conds,
                                        $query_options, $join_conds, FormOptions $opts
                                Severity: Minor
                                Found in includes/specialpage/ChangesListSpecialPage.php - About 45 mins to fix

                                  Function filterOnUserExperienceLevel has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function filterOnUserExperienceLevel( $specialPageClassName, $context, $dbr,
                                          &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedExpLevels, $now = 0
                                      ) {
                                          $selected = array_fill_keys( $selectedExpLevels, true );
                                  
                                  
                                  Severity: Minor
                                  Found in includes/specialpage/ChangesListSpecialPage.php - About 45 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function getLinkDays has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      protected function getLinkDays() {
                                          $linkDays = $this->getConfig()->get( MainConfigNames::RCLinkDays );
                                          $filterByAge = $this->getConfig()->get( MainConfigNames::RCFilterByAge );
                                          $maxAge = $this->getConfig()->get( MainConfigNames::RCMaxAge );
                                          if ( $filterByAge ) {
                                  Severity: Minor
                                  Found in includes/specialpage/ChangesListSpecialPage.php - About 35 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function includeRcFiltersApp has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      protected function includeRcFiltersApp() {
                                          $out = $this->getOutput();
                                          if ( $this->isStructuredFilterUiEnabled() && !$this->including() ) {
                                              $jsData = $this->getStructuredFilterJsData();
                                              $messages = [];
                                  Severity: Minor
                                  Found in includes/specialpage/ChangesListSpecialPage.php - About 35 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Avoid too many return statements within this method.
                                  Open

                                                              return $rc->getAttribute( 'rc_bot' );
                                  Severity: Major
                                  Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                                return $rc->getAttribute( 'rc_this_oldid' ) === $rc->getAttribute( 'page_latest' );
                                    Severity: Major
                                    Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                                  return $rc->getAttribute( 'rc_source' ) === RecentChange::SRC_NEW;
                                      Severity: Major
                                      Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                                return;
                                        Severity: Major
                                        Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                          return $rc->getAttribute( 'rc_source' ) === RecentChange::SRC_CATEGORIZE;
                                          Severity: Major
                                          Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                                        return $ctx->getUser()->equals( $rc->getPerformerIdentity() );
                                            Severity: Major
                                            Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                                          return $rc->getAttribute( 'rc_this_oldid' ) !== $rc->getAttribute( 'page_latest' );
                                              Severity: Major
                                              Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                            return $rc->getAttribute( 'rc_log_type' ) === "newusers";
                                                Severity: Major
                                                Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                              return $rc->getAttribute( 'rc_patrolled' ) == RecentChange::PRC_AUTOPATROLLED;
                                                  Severity: Major
                                                  Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                                return $rc->getAttribute( 'rc_patrolled' ) == RecentChange::PRC_PATROLLED;
                                                    Severity: Major
                                                    Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                                  return $rc->getAttribute( 'rc_minor' );
                                                      Severity: Major
                                                      Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                                    return $performer->isRegistered() &&
                                                                                        MediaWikiServices::getInstance()
                                                                                            ->getUserFactory()
                                                                                            ->newFromUserIdentity( $performer )
                                                                                            ->getExperienceLevel() === 'experienced';
                                                        Severity: Major
                                                        Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                                  return $rcPatrolledValues[ $s ];
                                                          Severity: Major
                                                          Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                        return !$rc->getAttribute( 'rc_bot' );
                                                            Severity: Major
                                                            Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                          return $rc->getAttribute( 'rc_patrolled' ) == RecentChange::PRC_UNPATROLLED;
                                                              Severity: Major
                                                              Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                            return !$rc->getAttribute( 'rc_minor' );
                                                                Severity: Major
                                                                Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                              return $rc->getAttribute( 'rc_source' ) === RecentChange::SRC_LOG;
                                                                  Severity: Major
                                                                  Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                                return !$ctx->getUser()->equals( $rc->getPerformerIdentity() );
                                                                    Severity: Major
                                                                    Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                                  return $rc->getAttribute( 'rc_source' ) === RecentChange::SRC_EDIT;
                                                                      Severity: Major
                                                                      Found in includes/specialpage/ChangesListSpecialPage.php - About 30 mins to fix

                                                                        Function registerFiltersFromDefinitions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                        Open

                                                                            protected function registerFiltersFromDefinitions( array $definition ) {
                                                                                $autoFillPriority = -1;
                                                                                foreach ( $definition as $groupDefinition ) {
                                                                                    if ( !isset( $groupDefinition['priority'] ) ) {
                                                                                        $groupDefinition['priority'] = $autoFillPriority;
                                                                        Severity: Minor
                                                                        Found in includes/specialpage/ChangesListSpecialPage.php - About 25 mins to fix

                                                                        Cognitive Complexity

                                                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                                                        A method's cognitive complexity is based on a few simple rules:

                                                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                                                        • Code is considered more complex for each "break in the linear flow of the code"
                                                                        • Code is considered more complex when "flow breaking structures are nested"

                                                                        Further reading

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

                                                                                            [
                                                                                                'name' => 'hidenewpages',
                                                                                                'label' => 'rcfilters-filter-newpages-label',
                                                                                                'description' => 'rcfilters-filter-newpages-description',
                                                                                                'default' => false,
                                                                        Severity: Major
                                                                        Found in includes/specialpage/ChangesListSpecialPage.php and 2 other locations - About 3 hrs to fix
                                                                        includes/specialpage/ChangesListSpecialPage.php on lines 428..443
                                                                        includes/specialpage/ChangesListSpecialPage.php on lines 463..478

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

                                                                        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

                                                                                            [
                                                                                                'name' => 'hidelog',
                                                                                                'label' => 'rcfilters-filter-logactions-label',
                                                                                                'description' => 'rcfilters-filter-logactions-description',
                                                                                                'default' => false,
                                                                        Severity: Major
                                                                        Found in includes/specialpage/ChangesListSpecialPage.php and 2 other locations - About 3 hrs to fix
                                                                        includes/specialpage/ChangesListSpecialPage.php on lines 428..443
                                                                        includes/specialpage/ChangesListSpecialPage.php on lines 444..459

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

                                                                        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

                                                                                            [
                                                                                                'name' => 'hidepageedits',
                                                                                                'label' => 'rcfilters-filter-pageedits-label',
                                                                                                'description' => 'rcfilters-filter-pageedits-description',
                                                                                                'default' => false,
                                                                        Severity: Major
                                                                        Found in includes/specialpage/ChangesListSpecialPage.php and 2 other locations - About 3 hrs to fix
                                                                        includes/specialpage/ChangesListSpecialPage.php on lines 444..459
                                                                        includes/specialpage/ChangesListSpecialPage.php on lines 463..478

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

                                                                        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

                                                                        There are no issues that match your filters.

                                                                        Category
                                                                        Status