wikimedia/mediawiki-core

View on GitHub
includes/libs/objectcache/wancache/WANObjectCache.php

Summary

Maintainability
F
1 wk
Test Coverage

File WANObjectCache.php has 1092 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/libs/objectcache/wancache/WANObjectCache.php - About 2 days to fix

    WANObjectCache has 60 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class WANObjectCache implements
        ExpirationAwareness,
        StorageAwareness,
        IStoreKeyEncoder,
        LoggerAwareInterface
    Severity: Major
    Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 1 day to fix

      Method fetchOrRegenerate has 141 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function fetchOrRegenerate( $key, $ttl, $callback, array $opts, array $cbParams ) {
              $checkKeys = $opts['checkKeys'] ?? [];
              $graceTTL = $opts['graceTTL'] ?? self::GRACE_TTL_NONE;
              $minAsOf = $opts['minAsOf'] ?? self::MIN_TIMESTAMP_NONE;
              $hotTTR = $opts['hotTTR'] ?? self::HOT_TTR;
      Severity: Major
      Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 5 hrs to fix

        Function fetchKeys has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

            protected function fetchKeys( array $keys, array $checkKeys, $touchedCb = null ) {
                $resByKey = [];
        
                // List of all sister keys that need to be fetched from cache
                $allSisterKeys = [];
        Severity: Minor
        Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 4 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 setMainValue has 90 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function setMainValue(
                $key,
                $value,
                $ttl,
                ?int $version,
        Severity: Major
        Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 3 hrs to fix

          Method fetchKeys has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function fetchKeys( array $keys, array $checkKeys, $touchedCb = null ) {
                  $resByKey = [];
          
                  // List of all sister keys that need to be fetched from cache
                  $allSisterKeys = [];
          Severity: Major
          Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 3 hrs to fix

            Function fetchOrRegenerate has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
            Open

                private function fetchOrRegenerate( $key, $ttl, $callback, array $opts, array $cbParams ) {
                    $checkKeys = $opts['checkKeys'] ?? [];
                    $graceTTL = $opts['graceTTL'] ?? self::GRACE_TTL_NONE;
                    $minAsOf = $opts['minAsOf'] ?? self::MIN_TIMESTAMP_NONE;
                    $hotTTR = $opts['hotTTR'] ?? self::HOT_TTR;
            Severity: Minor
            Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 3 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

            Function setMainValue has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
            Open

                private function setMainValue(
                    $key,
                    $value,
                    $ttl,
                    ?int $version,
            Severity: Minor
            Found in includes/libs/objectcache/wancache/WANObjectCache.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 getMultiWithUnionSetCallback has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                final public function getMultiWithUnionSetCallback(
                    ArrayIterator $keyedIds, $ttl, callable $callback, array $opts = []
                ) {
                    $checkKeys = $opts['checkKeys'] ?? [];
                    $minAsOf = $opts['minAsOf'] ?? self::MIN_TIMESTAMP_NONE;
            Severity: Major
            Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 2 hrs to fix

              Method setMainValue has 12 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      $key,
                      $value,
                      $ttl,
                      ?int $version,
                      ?float $walltime,
              Severity: Major
              Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 1 hr to fix

                Method unwrap has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function unwrap( $wrapped, $now ) {
                        // https://nikic.github.io/2014/12/22/PHPs-new-hashtable-implementation.html
                        $res = [
                            // Attributes that only depend on the fetched key value
                            self::RES_VALUE => false,
                Severity: Minor
                Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 1 hr to fix

                  Function unwrap has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function unwrap( $wrapped, $now ) {
                          // https://nikic.github.io/2014/12/22/PHPs-new-hashtable-implementation.html
                          $res = [
                              // Attributes that only depend on the fetched key value
                              self::RES_VALUE => false,
                  Severity: Minor
                  Found in includes/libs/objectcache/wancache/WANObjectCache.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 getWithSetCallback has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      final public function getWithSetCallback(
                          $key, $ttl, $callback, array $opts = [], array $cbParams = []
                      ) {
                          $version = $opts['version'] ?? null;
                          $pcTTL = $opts['pcTTL'] ?? self::TTL_UNCACHEABLE;
                  Severity: Minor
                  Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 1 hr to fix

                    Function getMultiWithUnionSetCallback has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                    Open

                        final public function getMultiWithUnionSetCallback(
                            ArrayIterator $keyedIds, $ttl, callable $callback, array $opts = []
                        ) {
                            $checkKeys = $opts['checkKeys'] ?? [];
                            $minAsOf = $opts['minAsOf'] ?? self::MIN_TIMESTAMP_NONE;
                    Severity: Minor
                    Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 55 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 fetchWrappedValuesForWarmupCache has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private function fetchWrappedValuesForWarmupCache( array $keys, array $checkKeys ) {
                            if ( !$keys ) {
                                return [];
                            }
                    
                    
                    Severity: Minor
                    Found in includes/libs/objectcache/wancache/WANObjectCache.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 isLotteryRefreshDue has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        protected function isLotteryRefreshDue( $res, $lowTTL, $ageNew, $hotTTR, $now ) {
                    Severity: Minor
                    Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 35 mins to fix

                      Method scheduleAsyncRefresh has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          private function scheduleAsyncRefresh( $key, $ttl, $callback, array $opts, array $cbParams ) {
                      Severity: Minor
                      Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 35 mins to fix

                        Method getWithSetCallback has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                $key, $ttl, $callback, array $opts = [], array $cbParams = []
                        Severity: Minor
                        Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 35 mins to fix

                          Method fetchOrRegenerate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              private function fetchOrRegenerate( $key, $ttl, $callback, array $opts, array $cbParams ) {
                          Severity: Minor
                          Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 35 mins to fix

                            Method setInterimValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                    $key,
                                    $value,
                                    $ttl,
                                    ?int $version,
                                    bool $segmentable
                            Severity: Minor
                            Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 35 mins to fix

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

                                  private function getInterimValue( $key, $minAsOf, $now, $touchedCb ) {
                                      if ( $this->useInterimHoldOffCaching ) {
                                          $interimSisterKey = $this->makeSisterKey( $key, self::TYPE_INTERIM );
                                          $wrapped = $this->cache->get( $interimSisterKey );
                                          $res = $this->unwrap( $wrapped, $now );
                              Severity: Minor
                              Found in includes/libs/objectcache/wancache/WANObjectCache.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 getNonProcessCachedMultiKeys has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  private function getNonProcessCachedMultiKeys( ArrayIterator $keys, array $opts ) {
                                      $pcTTL = $opts['pcTTL'] ?? self::TTL_UNCACHEABLE;
                              
                                      $keysMissing = [];
                                      if ( $pcTTL > 0 && $this->callbackDepth == 0 ) {
                              Severity: Minor
                              Found in includes/libs/objectcache/wancache/WANObjectCache.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 [ $placeholderValue, $version, $curState[self::RES_AS_OF] ];
                              Severity: Major
                              Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                        return [ $value, $version, $curState[self::RES_AS_OF] ];
                                Severity: Major
                                Found in includes/libs/objectcache/wancache/WANObjectCache.php - About 30 mins to fix

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

                                      final public function getWithSetCallback(
                                          $key, $ttl, $callback, array $opts = [], array $cbParams = []
                                      ) {
                                          $version = $opts['version'] ?? null;
                                          $pcTTL = $opts['pcTTL'] ?? self::TTL_UNCACHEABLE;
                                  Severity: Minor
                                  Found in includes/libs/objectcache/wancache/WANObjectCache.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

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

                                      final public function makeMultiKeys( array $ids, $keyCallback ) {
                                          $idByKey = [];
                                          foreach ( $ids as $id ) {
                                              // Discourage triggering of automatic makeKey() hashing in some backends
                                              if ( strlen( $id ) > 64 ) {
                                  Severity: Minor
                                  Found in includes/libs/objectcache/wancache/WANObjectCache.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

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

                                          $info = $legacyInfo
                                              ? $res[self::RES_AS_OF]
                                              : [
                                                  self::KEY_VERSION => $res[self::RES_VERSION],
                                                  self::KEY_AS_OF => $res[self::RES_AS_OF],
                                  Severity: Major
                                  Found in includes/libs/objectcache/wancache/WANObjectCache.php and 1 other location - About 1 hr to fix
                                  includes/libs/objectcache/wancache/WANObjectCache.php on lines 494..503

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

                                  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

                                              $info[$key] = $legacyInfo
                                                  ? $res[self::RES_AS_OF]
                                                  : [
                                                      self::KEY_VERSION => $res[self::RES_VERSION],
                                                      self::KEY_AS_OF => $res[self::RES_AS_OF],
                                  Severity: Major
                                  Found in includes/libs/objectcache/wancache/WANObjectCache.php and 1 other location - About 1 hr to fix
                                  includes/libs/objectcache/wancache/WANObjectCache.php on lines 427..436

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

                                  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

                                          $res = [
                                              // Attributes that only depend on the fetched key value
                                              self::RES_VALUE => false,
                                              self::RES_VERSION => null,
                                              self::RES_AS_OF => null,
                                  Severity: Minor
                                  Found in includes/libs/objectcache/wancache/WANObjectCache.php and 1 other location - About 45 mins to fix
                                  includes/libs/ParamValidator/ParamValidator.php on lines 760..769

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

                                  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

                                          } elseif ( $dataSnapshotLag > self::MAX_READ_LAG ) {
                                              // Case B: high snapshot lag
                                              $pregenSnapshotLag = ( $walltime !== null ) ? ( $dataSnapshotLag - $walltime ) : 0;
                                              if ( ( $pregenSnapshotLag + self::GENERATION_HIGH_SEC ) > self::MAX_READ_LAG ) {
                                                  // Case B1: generation started when transaction duration was already long
                                  Severity: Minor
                                  Found in includes/libs/objectcache/wancache/WANObjectCache.php and 1 other location - About 30 mins to fix
                                  includes/libs/objectcache/wancache/WANObjectCache.php on lines 855..869

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

                                  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

                                          } elseif ( $dataCombinedLag > self::MAX_READ_LAG ) {
                                              $pregenCombinedLag = ( $walltime !== null ) ? ( $dataCombinedLag - $walltime ) : 0;
                                              // Case D: medium snapshot lag with medium replication lag
                                              if ( ( $pregenCombinedLag + self::GENERATION_HIGH_SEC ) > self::MAX_READ_LAG ) {
                                                  // Case D1: generation started when read lag was too high
                                  Severity: Minor
                                  Found in includes/libs/objectcache/wancache/WANObjectCache.php and 1 other location - About 30 mins to fix
                                  includes/libs/objectcache/wancache/WANObjectCache.php on lines 836..850

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

                                  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