CORE-POS/IS4C

View on GitHub
fannie/modules/plugins2.0/RP/RpImport.php

Summary

Maintainability
F
1 wk
Test Coverage

File RpImport.php has 453 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

include(__DIR__ . '/../../../config.php');
if (!class_exists('FannieAPI')) {
    include(__DIR__ . '/../../../classlib2.0/FannieAPI.php');
Severity: Minor
Found in fannie/modules/plugins2.0/RP/RpImport.php - About 6 hrs to fix

    Function updateVendors has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateVendors($data)
        {
            $vendLC = new VendorLikeCodeMapModel($this->connection);
            $activeP = $this->connection->prepare("SELECT storeID FROM LikeCodeActiveMap WHERE inUse=1 AND likeCode=?");
            $catP = $this->connection->prepare("
    Severity: Minor
    Found in fannie/modules/plugins2.0/RP/RpImport.php - About 5 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 updateVendors has 91 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function updateVendors($data)
        {
            $vendLC = new VendorLikeCodeMapModel($this->connection);
            $activeP = $this->connection->prepare("SELECT storeID FROM LikeCodeActiveMap WHERE inUse=1 AND likeCode=?");
            $catP = $this->connection->prepare("
    Severity: Major
    Found in fannie/modules/plugins2.0/RP/RpImport.php - About 3 hrs to fix

      Method post_view has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function post_view()
          {
              $items = array();
              foreach (explode("\n", $this->form->in) as $line) {
                  if (preg_match('/(\d+)\](.)\[(.+){(.+)}(.+)\|(.+)_/', $line, $matches)) {
      Severity: Major
      Found in fannie/modules/plugins2.0/RP/RpImport.php - About 2 hrs to fix

        Method updateActive has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function updateActive($data)
            {
                $this->connection->query("UPDATE LikeCodeActiveMap SET inUse=0 WHERE likeCode <= 999"); 
                $upP = $this->connection->prepare("UPDATE LikeCodeActiveMap SET inUse=1 WHERE likeCode=? AND storeID=?");
                $this->connection->startTransaction();
        Severity: Minor
        Found in fannie/modules/plugins2.0/RP/RpImport.php - About 1 hr to fix

          Method findItem has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function findItem($vendorID, $name)
              {
                  switch ($vendorID) {
                      case -2:
                          return array('sku' => 'DIRECT', 'description' => $name);
          Severity: Minor
          Found in fannie/modules/plugins2.0/RP/RpImport.php - About 1 hr to fix

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

                public function updateActive($data)
                {
                    $this->connection->query("UPDATE LikeCodeActiveMap SET inUse=0 WHERE likeCode <= 999"); 
                    $upP = $this->connection->prepare("UPDATE LikeCodeActiveMap SET inUse=1 WHERE likeCode=? AND storeID=?");
                    $this->connection->startTransaction();
            Severity: Minor
            Found in fannie/modules/plugins2.0/RP/RpImport.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 post_view has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
            Open

                protected function post_view()
                {
                    $items = array();
                    foreach (explode("\n", $this->form->in) as $line) {
                        if (preg_match('/(\d+)\](.)\[(.+){(.+)}(.+)\|(.+)_/', $line, $matches)) {
            Severity: Minor
            Found in fannie/modules/plugins2.0/RP/RpImport.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 findItem has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                private function findItem($vendorID, $name)
                {
                    switch ($vendorID) {
                        case -2:
                            return array('sku' => 'DIRECT', 'description' => $name);
            Severity: Minor
            Found in fannie/modules/plugins2.0/RP/RpImport.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 changeCosts has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                public function changeCosts($changes)
                {
                    $actual = array();
                    $prodP = $this->connection->prepare("SELECT cost FROM products WHERE upc=?");
                    $lcP = $this->connection->prepare("SELECT upc FROM upcLike WHERE likeCode=?");
            Severity: Minor
            Found in fannie/modules/plugins2.0/RP/RpImport.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

            Avoid deeply nested control flow statements.
            Open

                            while (!feof($fp)) {
                                $line = fgets($fp);
                                $data = explode("\t", $line);
            
                                $info = isset($data[107]) ? $data[107] : '';
            Severity: Major
            Found in fannie/modules/plugins2.0/RP/RpImport.php - About 45 mins to fix

              Consider simplifying this complex logical expression.
              Open

                      if (isset($info['alberts']) && !empty($info['alberts'])) {
                          return 292;
                      } elseif (isset($info['cpw']) && !empty($info['cpw'])) {
                          return 293;
                      } elseif (isset($info['rdw']) && !empty($info['rdw'])) {
              Severity: Major
              Found in fannie/modules/plugins2.0/RP/RpImport.php - About 40 mins to fix

                Avoid too many return statements within this method.
                Open

                                return 0;
                Severity: Major
                Found in fannie/modules/plugins2.0/RP/RpImport.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return $info['direct'];
                  Severity: Major
                  Found in fannie/modules/plugins2.0/RP/RpImport.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return -2;
                    Severity: Major
                    Found in fannie/modules/plugins2.0/RP/RpImport.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return -2;
                      Severity: Major
                      Found in fannie/modules/plugins2.0/RP/RpImport.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return 0;
                        Severity: Major
                        Found in fannie/modules/plugins2.0/RP/RpImport.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                  return 'Unknown';
                          Severity: Major
                          Found in fannie/modules/plugins2.0/RP/RpImport.php - About 30 mins to fix

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

                                private function guessVendor($info)
                                {
                                    if (isset($info['alberts']) && !empty($info['alberts'])) {
                                        return 292;
                                    } elseif (isset($info['cpw']) && !empty($info['cpw'])) {
                            Severity: Minor
                            Found in fannie/modules/plugins2.0/RP/RpImport.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

                                protected function post_view()
                                {
                                    $items = array();
                                    foreach (explode("\n", $this->form->in) as $line) {
                                        if (preg_match('/(\d+)\](.)\[(.+){(.+)}(.+)\|(.+)_/', $line, $matches)) {
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 2 days to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 284..353

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

                            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

                                private function findItem($vendorID, $name)
                                {
                                    switch ($vendorID) {
                                        case -2:
                                            return array('sku' => 'DIRECT', 'description' => $name);
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 2 days to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 202..249

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

                            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

                                public function updateActive($data)
                                {
                                    $this->connection->query("UPDATE LikeCodeActiveMap SET inUse=0 WHERE likeCode <= 999"); 
                                    $upP = $this->connection->prepare("UPDATE LikeCodeActiveMap SET inUse=1 WHERE likeCode=? AND storeID=?");
                                    $this->connection->startTransaction();
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 1 day to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 42..87

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

                            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 (!isset($otherData[$lc])) {
                                                        $otherData[$lc] = array();
                                                    } else { 
                                                        if (!in_array($lc, $dupes)) {
                                                            $dupes[] = $lc;
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 4 hrs to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 456..470

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

                            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

                                public function cliWrapper()
                                {
                                    $out = $this->post_view();
                                    $out = str_replace('<tr>', '', $out);
                                    $out = str_replace('<td>', '', $out);
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 4 hrs to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 269..282

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

                            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

                                public function changeCosts($changes)
                                {
                                    $actual = array();
                                    $prodP = $this->connection->prepare("SELECT cost FROM products WHERE upc=?");
                                    $lcP = $this->connection->prepare("SELECT upc FROM upcLike WHERE likeCode=?");
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 4 hrs to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 13..36

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 175.

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

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

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

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

                            Refactorings

                            Further Reading

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

                                private function guessVendor($info)
                                {
                                    if (isset($info['alberts']) && !empty($info['alberts'])) {
                                        return 292;
                                    } elseif (isset($info['cpw']) && !empty($info['cpw'])) {
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 2 hrs to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 380..395

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

                            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

                                        foreach ($stores as $storeID) {
                                            $args = array(
                                                'LC' . $realLC,
                                                $storeID,
                                                $catID,
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 1 hr to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 182..197

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

                            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 ($mainCatalog && $vendorID > 0) {
                                                $vendLC->likeCode($lc);
                                                $vendLC->vendorID($vendorID);
                                                $mapped = $vendLC->find();
                                                if (count($mapped)) {
                            Severity: Major
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 1 hr to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 162..174

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

                            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 (!$catID) {
                                            $catID = $this->connection->getValue($catP2, array($info['sort']));
                                            if (!$catID) {
                                                $this->connection->execute($makeP, array($info['sort']));
                                                $catID = $this->connection->insertID();
                            Severity: Minor
                            Found in fannie/modules/plugins2.0/RP/RpImport.php and 1 other location - About 55 mins to fix
                            fannie/modules/plugins2.0/RP/RpImportCsv.php on lines 139..146

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

                            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