mambax7/xnewsletter

View on GitHub

Showing 96 of 379 total issues

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

<?php
/**
 * Faroese PHPMailer language file: refer to English translation for definitive list
 * @package PHPMailer
 * @author  Dávur Sørensen <http://www.profo-webdesign.dk>
Severity: Major
Found in include/phpmailer/language/phpmailer.lang-fo.php and 2 other locations - About 2 hrs to fix
include/phpmailer/language/phpmailer.lang-ch.php on lines 1..25
include/phpmailer/language/phpmailer.lang-ja.php on lines 1..26

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

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

<?php
/**
 * Japanese PHPMailer language file: refer to English translation for definitive list
 * @package PHPMailer
 * @author  Mitsuhiro Yoshida <http://mitstek.com/>
Severity: Major
Found in include/phpmailer/language/phpmailer.lang-ja.php and 2 other locations - About 2 hrs to fix
include/phpmailer/language/phpmailer.lang-ch.php on lines 1..25
include/phpmailer/language/phpmailer.lang-fo.php on lines 1..25

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

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

<?php
/**
 * Chinese PHPMailer language file: refer to English translation for definitive list
 * @package PHPMailer
 * @author  LiuXin <http://www.80x86.cn/blog/>
Severity: Major
Found in include/phpmailer/language/phpmailer.lang-ch.php and 2 other locations - About 2 hrs to fix
include/phpmailer/language/phpmailer.lang-fo.php on lines 1..25
include/phpmailer/language/phpmailer.lang-ja.php on lines 1..26

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/ImportHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/TemplateHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/CatsubscrHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/CatHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/LetterHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/*
Severity: Major
Found in class/TaskHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/ProtocolHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/MailinglistHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/AccountsHandler.php and 9 other locations - About 2 hrs to fix
class/BmhHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

<?php

namespace XoopsModules\Xnewsletter;

/**
Severity: Major
Found in class/BmhHandler.php and 9 other locations - About 2 hrs to fix
class/AccountsHandler.php on lines 1..60
class/CatHandler.php on lines 1..60
class/CatsubscrHandler.php on lines 1..60
class/ImportHandler.php on lines 1..60
class/LetterHandler.php on lines 1..60
class/MailinglistHandler.php on lines 1..60
class/ProtocolHandler.php on lines 1..60
class/TaskHandler.php on lines 1..56
class/TemplateHandler.php on lines 1..60

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

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

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

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

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

Refactorings

Further Reading

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

    case 'edit_cat':
        $adminObject->displayNavigation($currentFile);
        $adminObject->addItemButton(_AM_XNEWSLETTER_NEWCAT, '?op=new_cat', 'add');
        $adminObject->addItemButton(_AM_XNEWSLETTER_CATLIST, '?op=list', 'list');
        $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left'));
Severity: Major
Found in admin/cat.php and 1 other location - About 1 hr to fix
admin/template.php on lines 159..168

Duplicated Code

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

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

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

Tuning

This issue has a mass of 120.

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

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

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

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

Refactorings

Further Reading

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

    case 'edit_template':
        $adminObject->displayNavigation($currentFile);
        $adminObject->addItemButton(_AM_XNEWSLETTER_NEWTEMPLATE, '?op=new_template', 'add');
        $adminObject->addItemButton(_AM_XNEWSLETTER_TEMPLATELIST, '?op=list', 'list');
        $GLOBALS['xoopsTpl']->assign('buttons', $adminObject->renderButton('left'));
Severity: Major
Found in admin/template.php and 1 other location - About 1 hr to fix
admin/cat.php on lines 186..195

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

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

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

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

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

Refactorings

Further Reading

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

    if (\preg_match('/Original-Recipient: rfc822;(.*)/i', $dsn_report, $match)) {
        $email = \trim($match[1], "<> \t\r\n\0\x0B");
        /** @noinspection PhpUsageOfSilenceOperatorInspection */
        $email_arr = @\imap_rfc822_parse_adrlist($email, 'default.domain.name');
        if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') {
Severity: Major
Found in include/phpmailer_bmh/phpmailer-bmh_rules.php and 1 other location - About 1 hr to fix
include/phpmailer_bmh/phpmailer-bmh_rules.php on lines 577..584

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

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

                    } elseif ('"' == $quot) {
                        $regary = tln_findnxreg($body, $pos + 1, '\"');
                        if (false == $regary) {
                            return [false, false, false, $lt, mb_strlen($body)];
                        }
Severity: Major
Found in include/phpmailer/extras/htmlfilter.php and 1 other location - About 1 hr to fix
include/phpmailer/extras/htmlfilter.php on lines 392..422

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

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

    } elseif (\preg_match('/Final-Recipient: rfc822;(.*)/i', $dsn_report, $match)) {
        $email = \trim($match[1], "<> \t\r\n\0\x0B");
        /** @noinspection PhpUsageOfSilenceOperatorInspection */
        $email_arr = @\imap_rfc822_parse_adrlist($email, 'default.domain.name');
        if (isset($email_arr[0]->host) && $email_arr[0]->host != '.SYNTAX-ERROR.' && $email_arr[0]->host != 'default.domain.name') {
Severity: Major
Found in include/phpmailer_bmh/phpmailer-bmh_rules.php and 1 other location - About 1 hr to fix
include/phpmailer_bmh/phpmailer-bmh_rules.php on lines 570..584

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

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 ('\'' == $quot) {
                        $regary = tln_findnxreg($body, $pos + 1, '\'');
                        if (false == $regary) {
                            return [false, false, false, $lt, mb_strlen($body)];
                        }
Severity: Major
Found in include/phpmailer/extras/htmlfilter.php and 1 other location - About 1 hr to fix
include/phpmailer/extras/htmlfilter.php on lines 400..408

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

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

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

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

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

Refactorings

Further Reading

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

            if (!is_dir($uploaddir)) {
                $indexFile = XOOPS_UPLOAD_PATH . '/index.html';
                if (!mkdir($uploaddir, 0777) && !is_dir($uploaddir)) {
                    throw new \RuntimeException(sprintf('Directory "%s" was not created', $uploaddir));
                }
Severity: Major
Found in letter.php and 1 other location - About 1 hr to fix
admin/letter.php on lines 321..328

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

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