CORE-POS/IS4C

View on GitHub

Showing 1,963 of 8,684 total issues

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

    protected $PLAN_SALES = array(
        '1,6' => 51193.05,      // Hillside Produce
        '2,10' => 11416.48,     // Hillside Deli
        '2,11' => 31032.00,
        '2,16' => 12651.44,
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 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_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/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

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 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 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 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_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/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/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_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 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 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 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_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 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 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(
        '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

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

    protected $preview_opts = array(
        'upc_lc' => array(
            'display_name' => 'UPC/LC',
            'default' => 0,
            'required' => true
Severity: Major
Found in fannie/batches/xlsbatch/XlsBatchPage.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/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(
        'upc' => array(
            'display_name' => 'UPC *',
            'default' => 7,
            'required' => true
Severity: Major
Found in fannie/batches/UNFI/load-classes/CpwUploadPage.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/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 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(
        'phone' => array(
            'display_name' => 'Phone',
            'default' => 2,
            'required' => true
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/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(
        '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 2 locations. Consider refactoring.
Open

        if (preg_match('/[A-Z]+\/[A-Z\/]+/', $str, $matches)) {
            $origins = array();
            $all = explode('/', $matches[0]);
            foreach ($all as $a) {
                $exp = $this->expandCOOL($a);
Severity: Major
Found in fannie/purchasing/importers/CpwInvoiceImport.php and 1 other location - About 2 hrs to fix
fannie/item/likecodes/cool/CpwImport.php on lines 83..96

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

        if (preg_match('/[A-Z]+\/[A-Z\/]+/', $str, $matches)) {
            $origins = array();
            $all = explode('/', $matches[0]);
            foreach ($all as $a) {
                $exp = $this->expandCOOL($a);
Severity: Major
Found in fannie/item/likecodes/cool/CpwImport.php and 1 other location - About 2 hrs to fix
fannie/purchasing/importers/CpwInvoiceImport.php on lines 145..158

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

        [CLSCompliant(false)]
        public static explicit operator ulong?(JToken value)
        {
            if (value == null)
                return null;
pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 823..839
pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 868..884
pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 973..989

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

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

        [CLSCompliant(false)]
        public static explicit operator sbyte?(JToken value)
        {
            if (value == null)
                return null;
pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 823..839
pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 973..989
pos/is4c-nf/scale-drivers/drivers/NewMagellan/Newtonsoft.Json/Linq/JToken.cs on lines 996..1012

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

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