mambax7/waiting

View on GitHub

Showing 74 of 74 total issues

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

<?php declare(strict_types=1);

/**
 * @return array
 */
Severity: Major
Found in plugins/mylinks.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module PDdownloads                                          #
#                                                                        #
Severity: Major
Found in plugins/xyp4all.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46

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

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 declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module TDMDownloads                                         #
#                                                                        #
Severity: Major
Found in plugins/tdmdownloads.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module PDdownloads                                          #
#                                                                        #
Severity: Major
Found in plugins/pddownloads.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module xoopstube                                            #
# alain01 - Frxoops                                                      #
Severity: Major
Found in plugins/xoopstube.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module WF-Links                                             #
#                                                                        #
Severity: Major
Found in plugins/wflinks.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);
// This code is not tested

/**
 * @return array
Severity: Major
Found in plugins/xdirectory.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module PDlinks                                              #
#                                                                        #
Severity: Major
Found in plugins/pdlinks.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);
// This code is not tested

/**
 * @return array
Severity: Major
Found in plugins/addresses.php and 9 other locations - About 1 day to fix
plugins/mydownloads.php on lines 1..43
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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 declare(strict_types=1);

/**
 * @return array
 */
Severity: Major
Found in plugins/mydownloads.php and 9 other locations - About 1 day to fix
plugins/addresses.php on lines 1..44
plugins/mylinks.php on lines 1..43
plugins/pddownloads.php on lines 1..51
plugins/pdlinks.php on lines 1..51
plugins/tdmdownloads.php on lines 1..51
plugins/wflinks.php on lines 1..51
plugins/xdirectory.php on lines 1..44
plugins/xoopstube.php on lines 1..46
plugins/xyp4all.php on lines 1..51

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

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

Function xoops_module_update_waiting has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
Open

function xoops_module_update_waiting(\XoopsModule $module, $previousVersion = null)
{
    $moduleDirName      = \basename(\dirname(__DIR__));
    $moduleDirNameUpper = \mb_strtoupper($moduleDirName);

Severity: Minor
Found in include/onupdate.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

<?php declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module wgTransifex                                            #
#                                                                        #
Severity: Major
Found in plugins/wgtransifex.php and 1 other location - About 1 day to fix
plugins/wggallery.php on lines 1..48

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

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

<?php declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module wgGallery                                            #
#                                                                        #
Severity: Major
Found in plugins/wggallery.php and 1 other location - About 1 day to fix
plugins/wgtransifex.php on lines 1..49

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

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

Function truncateHtml has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
Open

    public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
    {
        if ($considerHtml) {
            // if the plain text is shorter than the maximum length, return the whole text
            if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
Severity: Minor
Found in class/Common/SysUtility.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

<?php declare(strict_types=1);

/**
 * @return array
 */
Severity: Major
Found in plugins/system.php and 1 other location - About 7 hrs to fix
plugins/wfsection.php on lines 1..36

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

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

<?php declare(strict_types=1);
//
// wf-sections ext waiting plugin
// author: karedokx <karedokx@yahoo.com> 15-Apr-2005
//
Severity: Major
Found in plugins/wfsection.php and 1 other location - About 7 hrs to fix
plugins/system.php on lines 1..33

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

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

Function b_waiting_waiting_show has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
Open

function b_waiting_waiting_show($options)
{
    $userLang = $GLOBALS['xoopsConfig']['language'];

    $sql_cache_min  = empty($options[1]) ? 0 : (int)$options[1];
Severity: Minor
Found in blocks/waiting_waiting.php - About 5 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

<?php declare(strict_types=1);

/**
 * @return array
 */
Severity: Major
Found in plugins/extgallery.php and 2 other locations - About 2 hrs to fix
plugins/extcal.php on lines 1..24
plugins/publisher.php on lines 1..33

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

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 declare(strict_types=1);

/**
 * @return array
 */
Severity: Major
Found in plugins/extcal.php and 2 other locations - About 2 hrs to fix
plugins/extgallery.php on lines 1..25
plugins/publisher.php on lines 1..33

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

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 declare(strict_types=1);

# Waiting Contents Extensible                                            #
# Plugin for module publisher                                            #
#                                                                        #
Severity: Major
Found in plugins/publisher.php and 2 other locations - About 2 hrs to fix
plugins/extcal.php on lines 1..24
plugins/extgallery.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 141.

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