CORE-POS/IS4C

View on GitHub

Showing 1,963 of 8,684 total issues

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

    public function hoursRedeemed()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('hoursRedeemed');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

    public function hoursWorked()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('hoursWorked');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

    public function cardNo()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('cardNo');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

    public function volunteerHoursAccountMapID()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('volunteerHoursAccountMapID');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

    public function cardNo()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('cardNo');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

    public function tdate()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('tdate');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

    public function uid()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('uid');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

    public function transNum()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('transNum');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 45..56
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121

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

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

    public function volunteerHoursActivityID()
    {
        if(func_num_args() == 0) {
            return $this->getColumn('volunteerHoursActivityID');
        } else if (func_num_args() > 1) {
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 41..52
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 54..65
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursAccountMapModel.php on lines 67..78
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 58..69
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 71..82
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 84..95
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 97..108
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 110..121
fannie/modules/plugins2.0/VolunteerHours/models/VolunteerHoursActivityModel.php on lines 123..134

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

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

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

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

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

Refactorings

Further Reading

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

foreach ($data as $k => $row) {
    if ($dbc->getValue($narrowP, array($row['upc'], $store))) {
        $row['full'] = false;
        $row['movementTag'] = $dbc->getValue($mtP, array($row['upc'], $store));
        $half[] = $row;
Severity: Major
Found in fannie/admin/labels/pdf_layouts/WFC_Hybrid_Single.php and 1 other location - About 3 hrs to fix
fannie/admin/labels/pdf_layouts/WFC_Hybrid.php on lines 165..175

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

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

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

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

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

Refactorings

Further Reading

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

foreach ($data as $k => $row) {
    if ($dbc->getValue($narrowP, array($row['upc'], $store))) {
        $row['full'] = false;
        $row['movementTag'] = $dbc->getValue($mtP, array($row['upc'], $store));
        $half[] = $row;
Severity: Major
Found in fannie/admin/labels/pdf_layouts/WFC_Hybrid.php and 1 other location - About 3 hrs to fix
fannie/admin/labels/pdf_layouts/WFC_Hybrid_Single.php on lines 165..175

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

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

            foreach ($sale as $row) {
                $pdf->SetX($posX);
                if (!empty($row[0])) {
                    $pdf->Cell(60, 5, str_replace('bold', '', $row[0]), 1, 0, 'L');
                    $pdf->Cell(20, 5, $header ? 'Qty' : '', 1, 0, 'L');
Severity: Major
Found in fannie/modules/plugins2.0/RP/RpDailyPage.php and 1 other location - About 3 hrs to fix
fannie/modules/plugins2.0/RP/RpDailyPage.php on lines 154..164

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

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

            foreach ($stock as $row) {
                $pdf->SetX($posX);
                if (!empty($row[0])) {
                    $pdf->Cell(60, 5, str_replace('bold', '', $row[0]), 1, 0, 'L');
                    $pdf->Cell(20, 5, $header ? 'Qty' : '', 1, 0, 'L');
Severity: Major
Found in fannie/modules/plugins2.0/RP/RpDailyPage.php and 1 other location - About 3 hrs to fix
fannie/modules/plugins2.0/RP/RpDailyPage.php on lines 170..180

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

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

            for (i=0; i<hIDs.length; i++) {
                var elemID = hIDs[i];
                var elem = $('#'+elemID);
                $(elem).val(state['onHand'][elemID]);
                mod.reCalcRow($(elem).closest('tr'));
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpFloral.js and 4 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 168..173
fannie/modules/plugins2.0/RP/rpDual.js on lines 169..174
fannie/modules/plugins2.0/RP/rpDual.js on lines 176..181
fannie/modules/plugins2.0/RP/rpOrder.js on lines 164..169

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

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

            for (i=0; i<hIDs.length; i++) {
                var elemID = hIDs[i];
                var elem = $('#'+elemID);
                $(elem).val(state['onHand'][elemID]);
                mod.reCalcRow($(elem).closest('tr'));
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDirect.js and 4 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDual.js on lines 169..174
fannie/modules/plugins2.0/RP/rpDual.js on lines 176..181
fannie/modules/plugins2.0/RP/rpFloral.js on lines 76..81
fannie/modules/plugins2.0/RP/rpOrder.js on lines 164..169

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

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

            for (i=0; i<hIDs.length; i++) {
                var elemID = hIDs[i];
                var elem = $('#'+elemID);
                $(elem).val(state['onHand'][elemID]);
                mod.reCalcRow($(elem).closest('tr'));
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpOrder.js and 4 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 168..173
fannie/modules/plugins2.0/RP/rpDual.js on lines 169..174
fannie/modules/plugins2.0/RP/rpDual.js on lines 176..181
fannie/modules/plugins2.0/RP/rpFloral.js on lines 76..81

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

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

            for (i=0; i<hIDs.length; i++) {
                var elemID = hIDs[i];
                var elem = $('#'+elemID);
                $(elem).val(state['onHand1'][elemID]);
                mod.reCalcRow($(elem).closest('tr'));
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDual.js and 4 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 168..173
fannie/modules/plugins2.0/RP/rpDual.js on lines 176..181
fannie/modules/plugins2.0/RP/rpFloral.js on lines 76..81
fannie/modules/plugins2.0/RP/rpOrder.js on lines 164..169

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

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

            for (i=0; i<hIDs.length; i++) {
                var elemID = hIDs[i];
                var elem = $('#'+elemID);
                $(elem).val(state['onHand2'][elemID]);
                mod.reCalcRow($(elem).closest('tr'));
Severity: Major
Found in fannie/modules/plugins2.0/RP/rpDual.js and 4 other locations - About 3 hrs to fix
fannie/modules/plugins2.0/RP/rpDirect.js on lines 168..173
fannie/modules/plugins2.0/RP/rpDual.js on lines 169..174
fannie/modules/plugins2.0/RP/rpFloral.js on lines 76..81
fannie/modules/plugins2.0/RP/rpOrder.js on lines 164..169

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

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

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

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

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

Refactorings

Further Reading

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

    private function sanitizeString($current_value)
    {
        // quoted must not contain single quotes
        $current_value = str_replace("'", '', $current_value);
        // must not start with backslash
Severity: Major
Found in pos/is4c-nf/install/conf/FormFactory.php and 1 other location - About 3 hrs to fix
fannie/install/util.php on lines 330..344

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

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

function sanitizeFieldQuoting($current_value)
{
    // quoted must not contain single quotes
    $current_value = str_replace("'", '', $current_value);
    // must not start with backslash
Severity: Major
Found in fannie/install/util.php and 1 other location - About 3 hrs to fix
pos/is4c-nf/install/conf/FormFactory.php on lines 284..298

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

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