CORE-POS/IS4C

View on GitHub

Showing 8,683 of 8,684 total issues

Method searchQuery has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function searchQuery($upc, $numType, $inUseFlag, $store_id)
    {
        $query = '';
        $args = array();
        if (is_numeric($upc)) {
Severity: Major
Found in fannie/item/ItemEditorPage.php - About 2 hrs to fix

    Method realSave has 58 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function realSave($upc, $suffix)
        {
            try {
                $fName = 'flags' . $suffix;
                $flags = $this->form->{$fName};
    Severity: Major
    Found in fannie/item/modules/ItemFlagsModule.php - About 2 hrs to fix

      Method get_barcodes has 58 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function get_barcodes($order)
          {
              $pdf = new FPDF('P', 'mm', 'Letter');
              $pdf->AddPage();
              $pdf->SetMargins(10,10,10);
      Severity: Major
      Found in fannie/item/images/ScannieBulkWrapper.php - About 2 hrs to fix

        Method GetCashBack has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected byte[] GetCashBack()
            {
                System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
                byte[] form_name = enc.GetBytes("cashb.K3Z");
                byte[] msg = new byte[79];

          Method ReadJson has 58 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
                  {
                      if (reader.TokenType == JsonToken.Null)
                          return null;
          
          

            Method ParseValue has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    private object ParseValue()
                    {
                        char currentChar = _expression[_currentIndex];
                        if (currentChar == '\'')
                        {

              Method GetSerializableMembers has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      protected virtual List<MemberInfo> GetSerializableMembers(Type objectType)
                      {
                          bool ignoreSerializableAttribute;
              #if !(NETFX_CORE || PORTABLE || PORTABLE40)
                          ignoreSerializableAttribute = IgnoreSerializableAttribute;

                Method SetToken has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private void SetToken(JToken token)
                        {
                            switch (token.Type)
                            {
                                case JTokenType.Object:

                  File WFC_MEAT_SN_14UP.php has 263 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  use COREPOS\Fannie\API\FanniePlugin;
                  if (!class_exists('FpdfWithBarcode')) {
                      include(dirname(__FILE__) . '/../FpdfWithBarcode.php');
                  }
                  Severity: Minor
                  Found in fannie/admin/labels/pdf_layouts/WFC_MEAT_SN_14UP.php - About 2 hrs to fix

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

                            let items = this.props.items.map((i) =>
                                <Item key={i.id} {...i}
                                    manageItem={this.props.manageItem}
                                    toggle={this.props.manageItem.toggle} />
                            );
                    Severity: Major
                    Found in fannie/batches/EndCapper/src/Shelf.js and 1 other location - About 2 hrs to fix
                    fannie/batches/EndCapper/src/ToolBar.js on lines 98..102

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

                    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

                            let items = this.props.items.map((i) =>
                                <Item key={i.id} {...i}
                                    manageItem={this.props.manageItem}
                                    toggle={this.props.manageItem.toggle} />
                            );
                    Severity: Major
                    Found in fannie/batches/EndCapper/src/ToolBar.js and 1 other location - About 2 hrs to fix
                    fannie/batches/EndCapper/src/Shelf.js on lines 38..42

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

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

                        protected $preview_opts = array(
                            'upc' => array(
                                'display_name' => 'UPC *',
                                'default' => 7,
                                'required' => true
                    Severity: Major
                    Found in fannie/batches/UNFI/load-classes/AlbertsUploadPage.php and 6 other locations - About 2 hrs to fix
                    fannie/batches/UNFI/load-classes/CpwProduceUploadPage.php on lines 17..43
                    fannie/batches/UNFI/load-classes/CpwUploadPage.php on lines 37..63
                    fannie/batches/UNFI/load-classes/RdwUploadPage.php on lines 38..64
                    fannie/batches/xlsbatch/XlsBatchPage.php on lines 40..66
                    fannie/modules/plugins2.0/WfcGazetteBilling/WfcGazetteBillingPage.php on lines 13..39
                    fannie/purchasing/importers/CpwInvoiceImport.php on lines 99..125

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

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

                        protected $PLAN_SALES_Q2_2018 = array(
                            '1,6' => 51031.00,      // Hillside Produce
                            '2,10' => 11448.32,     // Hillside Deli
                            '2,11' => 31119.86,
                            '2,16' => 12686.82,
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 35..60
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 62..87
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 89..114
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 116..141
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 50..75
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 77..102
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 131..156
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 158..183
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 99..124
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 126..151
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 153..178
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 180..205
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 207..232

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

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

                        protected $PLAN_SALES_Q3_2018 = array(
                            '1,6' => 51510.00,      // Hillside Produce
                            '2,10' => 11676.94,     // Hillside Deli
                            '2,11' => 31742.34,
                            '2,16' => 12940.72,
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 35..60
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 62..87
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 89..114
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 116..141
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 50..75
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 77..102
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 104..129
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 158..183
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 99..124
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 126..151
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 153..178
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 180..205
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 207..232

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

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

                        protected $PLAN_SALES_Q1_2018 = array(
                            '1,6' => 53904.29,      // Hillside Produce
                            '2,10' => 12187.19,     // Hillside Deli
                            '2,11' => 33128.32,
                            '2,16' => 13505.62,
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 62..87
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 89..114
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 116..141
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 50..75
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 77..102
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 104..129
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 131..156
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 158..183
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 99..124
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 126..151
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 153..178
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 180..205
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 207..232

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

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

                        protected $PLAN_SALES_Q2_2018 = array(
                            '1,6' => 51031.00,      // Hillside Produce
                            '2,10' => 11448.32,     // Hillside Deli
                            '2,11' => 31119.86,
                            '2,16' => 12686.82,
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 35..60
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 89..114
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 116..141
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 50..75
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 77..102
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 104..129
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 131..156
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 158..183
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 99..124
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 126..151
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 153..178
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 180..205
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 207..232

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

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

                        protected $PLAN_SALES_Q2_2018 = array(
                            '1,6' => 51031.00,      // Hillside Produce
                            '2,10' => 11448.32,     // Hillside Deli
                            '2,11' => 31119.86,
                            '2,16' => 12686.82,
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 35..60
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 62..87
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 89..114
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 116..141
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 50..75
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 77..102
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 104..129
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 131..156
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 158..183
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 99..124
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 126..151
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 180..205
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 207..232

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

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

                        protected $PLAN_SALES_Q4_2018 = array(
                            '1,6' => 52231.00,      // Hillside Produce
                            '2,10' => 11840.47,     // Hillside Deli
                            '2,11' => 32186.37,
                            '2,16' => 13122.16,
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 35..60
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 62..87
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfBigBoardReport.php on lines 89..114
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 50..75
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 77..102
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 104..129
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 131..156
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfSummaryReport.php on lines 158..183
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 99..124
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 126..151
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 153..178
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 180..205
                    fannie/modules/plugins2.0/OpenBookFinancingV2/ObfWeeklyReportV2.php on lines 207..232

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

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

                        protected $preview_opts = array(
                            'upc' => array(
                                'display_name' => 'UPC *',
                                'default' => 3,
                                'required' => true
                    Severity: Major
                    Found in fannie/batches/UNFI/load-classes/RdwUploadPage.php and 6 other locations - About 2 hrs to fix
                    fannie/batches/UNFI/load-classes/AlbertsUploadPage.php on lines 38..64
                    fannie/batches/UNFI/load-classes/CpwProduceUploadPage.php on lines 17..43
                    fannie/batches/UNFI/load-classes/CpwUploadPage.php on lines 37..63
                    fannie/batches/xlsbatch/XlsBatchPage.php on lines 40..66
                    fannie/modules/plugins2.0/WfcGazetteBilling/WfcGazetteBillingPage.php on lines 13..39
                    fannie/purchasing/importers/CpwInvoiceImport.php on lines 99..125

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

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

                        protected $preview_opts = array(
                            'qty' => array(
                                'display_name' => 'Qty Ordered *',
                                'default' => 0,
                                'required' => true
                    Severity: Major
                    Found in fannie/purchasing/importers/CpwInvoiceImport.php and 6 other locations - About 2 hrs to fix
                    fannie/batches/UNFI/load-classes/AlbertsUploadPage.php on lines 38..64
                    fannie/batches/UNFI/load-classes/CpwProduceUploadPage.php on lines 17..43
                    fannie/batches/UNFI/load-classes/CpwUploadPage.php on lines 37..63
                    fannie/batches/UNFI/load-classes/RdwUploadPage.php on lines 38..64
                    fannie/batches/xlsbatch/XlsBatchPage.php on lines 40..66
                    fannie/modules/plugins2.0/WfcGazetteBilling/WfcGazetteBillingPage.php on lines 13..39

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

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

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

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

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

                    Refactorings

                    Further Reading

                    Severity
                    Category
                    Status
                    Source
                    Language