mambax7/pedigree

View on GitHub
updateowner.php

Summary

Maintainability
F
3 days
Test Coverage

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

if ('ct' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_CITY . '</b>', 'city', $size = 50, $maxsize = 255, $value = $city));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'city'));
    $form->addElement(new \XoopsFormHidden('curvalcity', $city));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 113..120
updateowner.php on lines 122..129
updateowner.php on lines 131..138
updateowner.php on lines 140..147
updateowner.php on lines 158..165
updateowner.php on lines 167..174
updateowner.php on lines 176..183

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

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

if ('pc' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_PC . '</b>', 'postcode', $size = 50, $maxsize = 255, $value = $postcode));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'postcode'));
    $form->addElement(new \XoopsFormHidden('curvalpostcode', $postcode));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 113..120
updateowner.php on lines 122..129
updateowner.php on lines 131..138
updateowner.php on lines 149..156
updateowner.php on lines 158..165
updateowner.php on lines 167..174
updateowner.php on lines 176..183

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

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

if ('we' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_WEB . '</b>', 'web', $size = 50, $maxsize = 255, $value = $web));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'website'));
    $form->addElement(new \XoopsFormHidden('curvalweb', $web));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 113..120
updateowner.php on lines 122..129
updateowner.php on lines 131..138
updateowner.php on lines 140..147
updateowner.php on lines 149..156
updateowner.php on lines 158..165
updateowner.php on lines 167..174

Duplicated Code

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

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

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

Tuning

This issue has a mass of 150.

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

if ('nl' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<span style="font-weight: bold;">' . _MA_PEDIGREE_OWN_LNAME . '</span>', 'pnamel', $size = 50, $maxsize = 255, $value = $pnamel));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'lastname'));
    $form->addElement(new \XoopsFormHidden('curvalnamel', $pnamel));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 113..120
updateowner.php on lines 122..129
updateowner.php on lines 131..138
updateowner.php on lines 140..147
updateowner.php on lines 149..156
updateowner.php on lines 158..165
updateowner.php on lines 167..174
updateowner.php on lines 176..183

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

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

if ('pn' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_PN . '</b>', 'phonenumber', $size = 50, $maxsize = 255, $value = $phonenumber));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'phonenumber'));
    $form->addElement(new \XoopsFormHidden('curvalphonenumber', $phonenumber));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 113..120
updateowner.php on lines 122..129
updateowner.php on lines 131..138
updateowner.php on lines 140..147
updateowner.php on lines 149..156
updateowner.php on lines 167..174
updateowner.php on lines 176..183

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

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

if ('nf' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_OWN_FNAME . '</b>', 'pnamef', $size = 50, $maxsize = 255, $value = $pnamef));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'firstname'));
    $form->addElement(new \XoopsFormHidden('curvalnamef', $pnamef));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 122..129
updateowner.php on lines 131..138
updateowner.php on lines 140..147
updateowner.php on lines 149..156
updateowner.php on lines 158..165
updateowner.php on lines 167..174
updateowner.php on lines 176..183

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

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

if ('st' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_STR . '</b>', 'street', $size = 50, $maxsize = 255, $value = $street));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'streetname'));
    $form->addElement(new \XoopsFormHidden('curvalstreet', $street));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 113..120
updateowner.php on lines 131..138
updateowner.php on lines 140..147
updateowner.php on lines 149..156
updateowner.php on lines 158..165
updateowner.php on lines 167..174
updateowner.php on lines 176..183

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

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

if ('hn' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_HN . '</b>', 'housenumber', $size = 50, $maxsize = 255, $value = $housenumber));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'housenumber'));
    $form->addElement(new \XoopsFormHidden('curvalhousenumber', $housenumber));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 113..120
updateowner.php on lines 122..129
updateowner.php on lines 140..147
updateowner.php on lines 149..156
updateowner.php on lines 158..165
updateowner.php on lines 167..174
updateowner.php on lines 176..183

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

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

if ('em' === $fld || 'all' === $fld) {
    $form->addElement(new \XoopsFormText('<b>' . _MA_PEDIGREE_FLD_OWN_EMAIL . '</b>', 'email', $size = 50, $maxsize = 255, $value = $email));
    $form->addElement(new \XoopsFormHidden('dbtable', 'pedigree_owner'));
    $form->addElement(new \XoopsFormHidden('dbfield', 'emailadres'));
    $form->addElement(new \XoopsFormHidden('curvalemail', $email));
Severity: Major
Found in updateowner.php and 8 other locations - About 3 hrs to fix
updateowner.php on lines 104..111
updateowner.php on lines 113..120
updateowner.php on lines 122..129
updateowner.php on lines 131..138
updateowner.php on lines 140..147
updateowner.php on lines 149..156
updateowner.php on lines 158..165
updateowner.php on lines 176..183

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

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status