CORE-POS/IS4C

View on GitHub
fannie/ordering/ajax-calls.php

Summary

Maintainability
F
1 wk
Test Coverage
F
0%

File ajax-calls.php has 1211 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*******************************************************************************

    Copyright 2010 Whole Foods Co-op

Severity: Major
Found in fannie/ordering/ajax-calls.php - About 3 days to fix

    Method getCustomerForm has 292 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function getCustomerForm($orderID,$memNum="0")
    {
        global $FANNIE_OP_DB, $TRANS, $FANNIE_TRANS_DB, $canEdit;
        $dbc = FannieDB::get($FANNIE_OP_DB);
    
    
    Severity: Major
    Found in fannie/ordering/ajax-calls.php - About 1 day to fix

      Function getCustomerForm has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
      Open

      function getCustomerForm($orderID,$memNum="0")
      {
          global $FANNIE_OP_DB, $TRANS, $FANNIE_TRANS_DB, $canEdit;
          $dbc = FannieDB::get($FANNIE_OP_DB);
      
      
      Severity: Minor
      Found in fannie/ordering/ajax-calls.php - About 1 day 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 getCustomerNonForm has 143 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function getCustomerNonForm($orderID)
      {
          global $FANNIE_OP_DB, $TRANS, $FANNIE_TRANS_DB;
          $dbc = FannieDB::get($FANNIE_OP_DB);
      
      
      Severity: Major
      Found in fannie/ordering/ajax-calls.php - About 5 hrs to fix

        Method editableItemList has 88 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function editableItemList($orderID)
        {
            global $FANNIE_OP_DB, $TRANS;
            $dbc = FannieDB::get($FANNIE_OP_DB);
        
        
        Severity: Major
        Found in fannie/ordering/ajax-calls.php - About 3 hrs to fix

          Method duplicateOrder has 78 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function duplicateOrder($old_id,$from='CompleteSpecialOrder')
          {
              global $FANNIE_OP_DB,$TRANS, $FANNIE_TRANS_DB;
              $dbc = FannieDB::get($FANNIE_OP_DB);
              $new_id = createEmptyOrder();
          Severity: Major
          Found in fannie/ordering/ajax-calls.php - About 3 hrs to fix

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

            function getCustomerNonForm($orderID)
            {
                global $FANNIE_OP_DB, $TRANS, $FANNIE_TRANS_DB;
                $dbc = FannieDB::get($FANNIE_OP_DB);
            
            
            Severity: Minor
            Found in fannie/ordering/ajax-calls.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

            Method getItemNonForm has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function getItemNonForm($orderID)
            {
                global $FANNIE_OP_DB, $TRANS;
                $dbc = FannieDB::get($FANNIE_OP_DB);
            
            
            Severity: Major
            Found in fannie/ordering/ajax-calls.php - About 2 hrs to fix

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

              function editableItemList($orderID)
              {
                  global $FANNIE_OP_DB, $TRANS;
                  $dbc = FannieDB::get($FANNIE_OP_DB);
              
              
              Severity: Minor
              Found in fannie/ordering/ajax-calls.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 addUPC has 42 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function addUPC($orderID,$memNum,$upc,$num_cases=1)
              {
                  global $FANNIE_OP_DB,$TRANS;
                  $dbc = FannieDB::get($FANNIE_OP_DB);
              
              
              Severity: Minor
              Found in fannie/ordering/ajax-calls.php - About 1 hr to fix

                Method genericRow has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function genericRow($orderID)
                {
                    global $FANNIE_OP_DB;
                    $dbc = FannieDB::get($FANNIE_OP_DB);
                    return array(
                Severity: Minor
                Found in fannie/ordering/ajax-calls.php - About 1 hr to fix

                  Method itemList has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function itemList($orderID,$table="PendingSpecialOrder")
                  {
                      global $FANNIE_OP_DB, $TRANS;
                      $dbc = FannieDB::get($FANNIE_OP_DB);
                  
                  
                  Severity: Minor
                  Found in fannie/ordering/ajax-calls.php - About 1 hr to fix

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

                    function getItemForm($orderID)
                    {
                        global $FANNIE_OP_DB, $canEdit;
                        $dbc = FannieDB::get($FANNIE_OP_DB);
                        
                    Severity: Minor
                    Found in fannie/ordering/ajax-calls.php - About 1 hr to fix

                      Function getItemNonForm has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function getItemNonForm($orderID)
                      {
                          global $FANNIE_OP_DB, $TRANS;
                          $dbc = FannieDB::get($FANNIE_OP_DB);
                      
                      
                      Severity: Minor
                      Found in fannie/ordering/ajax-calls.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 getOrderHistory has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function getOrderHistory($orderID)
                      {
                          global $FANNIE_OP_DB, $FANNIE_TRANS_DB;
                      
                          $dbc = FannieDB::get($FANNIE_OP_DB);
                      Severity: Minor
                      Found in fannie/ordering/ajax-calls.php - About 1 hr to fix

                        Method createEmptyOrder has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function createEmptyOrder()
                        {
                            global $FANNIE_OP_DB,$TRANS,$FANNIE_SERVER_DBMS, $FANNIE_TRANS_DB;
                            $dbc = FannieDB::get($FANNIE_OP_DB);
                            $user = checkLogin();
                        Severity: Minor
                        Found in fannie/ordering/ajax-calls.php - About 1 hr to fix

                          Method reprice has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function reprice($oid,$tid,$reg=false)
                          {
                              global $FANNIE_OP_DB, $TRANS;
                              $dbc = FannieDB::get($FANNIE_OP_DB);
                          
                          
                          Severity: Minor
                          Found in fannie/ordering/ajax-calls.php - About 1 hr to fix

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

                            function itemList($orderID,$table="PendingSpecialOrder")
                            {
                                global $FANNIE_OP_DB, $TRANS;
                                $dbc = FannieDB::get($FANNIE_OP_DB);
                            
                            
                            Severity: Minor
                            Found in fannie/ordering/ajax-calls.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 duplicateOrder has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function duplicateOrder($old_id,$from='CompleteSpecialOrder')
                            {
                                global $FANNIE_OP_DB,$TRANS, $FANNIE_TRANS_DB;
                                $dbc = FannieDB::get($FANNIE_OP_DB);
                                $new_id = createEmptyOrder();
                            Severity: Minor
                            Found in fannie/ordering/ajax-calls.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 reprice has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            function reprice($oid,$tid,$reg=false)
                            {
                                global $FANNIE_OP_DB, $TRANS;
                                $dbc = FannieDB::get($FANNIE_OP_DB);
                            
                            
                            Severity: Minor
                            Found in fannie/ordering/ajax-calls.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 2 locations. Consider refactoring.
                            Open

                                if ($memNum != 0) {
                                    $namesP = $dbc->prepare("SELECT personNum,FirstName,LastName FROM custdata
                                        WHERE CardNo=? ORDER BY personNum");
                                    $namesR = $dbc->execute($namesP,array($memNum));
                                    while($namesW = $dbc->fetch_row($namesR)) {
                            Severity: Major
                            Found in fannie/ordering/ajax-calls.php and 1 other location - About 5 hrs to fix
                            fannie/ordering/OrderReviewPage.php on lines 80..98

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

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

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

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

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

                            Refactorings

                            Further Reading

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

                                    if ($w['discounttype'] == 1 || $w['discounttype'] == 2) {
                                        $ret .= '<td id="discPercent'.$w['trans_id'].'">Sale</td>';
                                    } else if ($w['regPrice'] != $w['total']) {
                                        $ret .= sprintf('<td id="discPercent%d">%d%%</td>',$w['upc'],
                                            round(100*(($w['regPrice']-$w['total'])/$w['regPrice'])));
                            Severity: Major
                            Found in fannie/ordering/ajax-calls.php and 1 other location - About 2 hrs to fix
                            fannie/ordering/ajax-calls.php on lines 1468..1475

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

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

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

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

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

                            Refactorings

                            Further Reading

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

                                        if ($w['discounttype'] == 1 || $w['discounttype'] == 2) {
                                            $ret .= '<td id="discPercent'.$w['upc'].'">Sale</td>';
                                        } else if ($w['regPrice'] != $w['total']) {
                                            $ret .= sprintf('<td id="discPercent%s">%d%%</td>',$w['upc'],
                                                round(100*(($w['regPrice']-$w['total'])/$w['regPrice'])));
                            Severity: Major
                            Found in fannie/ordering/ajax-calls.php and 1 other location - About 2 hrs to fix
                            fannie/ordering/ajax-calls.php on lines 1342..1349

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

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

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

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

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

                            Refactorings

                            Further Reading

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

                                if (empty($names)) {
                                    $ret .= sprintf('<tr><th>First Name</th><td>%s
                                            </td>',$orderModel->firstName(),$orderID);
                                    $ret .= sprintf('<th>Last Name</th><td>%s
                                            </td>',
                            Severity: Major
                            Found in fannie/ordering/ajax-calls.php and 1 other location - About 1 hr to fix
                            fannie/ordering/OrderReviewPage.php on lines 155..168

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

                            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 ($row['entry_type'] == 'PURCHASED') {
                                        $trans_num = $row['entry_value'];
                                        $tdate = date('Y-m-d', strtotime($row['entry_date']));
                                        $link = '../admin/LookupReceipt/RenderReceiptPage.php?date=' . $tdate . '&receipt=' . $trans_num;
                                        $row['entry_value'] = sprintf('<a href="%s" target="_%s">%s</a>', $link, $trans_num, $trans_num);
                            Severity: Minor
                            Found in fannie/ordering/ajax-calls.php and 1 other location - About 55 mins to fix
                            fannie/ordering/OrderReviewPage.php on lines 340..345

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

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

                                if (file_exists("{$cachepath}{$username}.prints")) {
                                    $prints = unserialize(file_get_contents("{$cachepath}{$username}.prints"));
                                } else {
                                    $fptr = fopen("{$cachepath}{$username}.prints",'w');
                                    fwrite($fptr,serialize($prints));
                            Severity: Major
                            Found in fannie/ordering/ajax-calls.php and 3 other locations - About 45 mins to fix
                            fannie/ordering/NewSpecialOrdersPage.php on lines 55..61
                            fannie/ordering/OrderViewPage.php on lines 568..574
                            fannie/ordering/clearinghouse.php on lines 63..69

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

                            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

                                case 'saveQty':
                                    $upP = $dbc->prepare("UPDATE {$TRANS}PendingSpecialOrder SET
                                        quantity=? WHERE order_id=? AND trans_id=?");
                                    $dbc->execute($upP, array($_REQUEST['qty'],$orderID,$_REQUEST['transID']));
                                    $info = reprice($orderID,$_REQUEST['transID']);
                            Severity: Minor
                            Found in fannie/ordering/ajax-calls.php and 1 other location - About 35 mins to fix
                            fannie/ordering/ajax-calls.php on lines 123..129

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

                            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

                                case 'saveUnit':
                                    $upP = $dbc->prepare("UPDATE {$TRANS}PendingSpecialOrder SET
                                        unitPrice=? WHERE order_id=? AND trans_id=?");
                                    $dbc->execute($upP, array($_REQUEST['unitPrice'],$orderID,$_REQUEST['transID']));
                                    $info = reprice($orderID,$_REQUEST['transID']);
                            Severity: Minor
                            Found in fannie/ordering/ajax-calls.php and 1 other location - About 35 mins to fix
                            fannie/ordering/ajax-calls.php on lines 116..122

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

                            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