ImpressCMS/impresscms

View on GitHub

Showing 47,251 of 47,256 total issues

Function imanager_clone has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function imanager_clone() {
    global $target, $type;

    if (!icms::$security->check()) {
        redirect_header('browser.php?op=list&target=' . $target . '&type=' . $type, 3, implode('<br />', icms::$security->getErrors()));
Severity: Minor
Found in htdocs/modules/system/admin/images/browser.php - About 1 hr 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

Function b_system_newmembers_show has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function b_system_newmembers_show($options) {
    global $icmsConfigUser;

    $block = array();
    $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('level', 0, '>'));
Severity: Minor
Found in htdocs/modules/system/blocks/system_blocks.php - About 1 hr 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

Function imanager_clone has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function imanager_clone() {
    if (!icms::$security->check()) {
        redirect_header('admin.php?fct=images', 3, implode('<br />', icms::$security->getErrors()));
    }

Severity: Minor
Found in htdocs/modules/system/admin/images/main.php - About 1 hr 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

Function b_system_notification_show has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

function b_system_notification_show() {
    icms_loadLanguageFile('core', 'notification');
    // Notification must be enabled, and user must be logged in
    if (empty(icms::$user) || !icms_data_notification_Handler::isEnabled('block')) {
        return false; // do not display block
Severity: Minor
Found in htdocs/modules/system/blocks/system_blocks.php - About 1 hr 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

Method xoopsCodeTarea has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function xoopsCodeTarea($textarea_id, $cols=60, $rows=15, $suffix=null)
{
    icms_core_Debug::setDeprecated('icms_form_elements_Dhtmltextarea.', sprintf(_CORE_REMOVE_IN_VERSION, '2.0'));
    $hiddentext = isset($suffix) ? 'xoopsHiddenText'.trim($suffix) : 'xoopsHiddenText';
    //Hack for url, email ...., the anchor is for having a link on [_More...]
Severity: Minor
Found in htdocs/include/xoopscodes.php - About 1 hr to fix

    Method b_system_main_show has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function b_system_main_show() {
        global $icmsConfigUser;
    
        $block = array();
        $block['lang_home'] = _MB_SYSTEM_HOME;
    Severity: Minor
    Found in htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

      Method b_system_topposters_show has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function b_system_topposters_show($options) {
          global $icmsConfigUser;
      
          $block = array();
          $criteria = new icms_db_criteria_Compo(new icms_db_criteria_Item('level', 0, '>'));
      Severity: Minor
      Found in htdocs/modules/system/blocks/system_blocks.php - About 1 hr to fix

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

        <?php
        // $Id: comments.php 22476 2011-08-30 16:33:29Z phoenyx $
        //%%%%%% Comment Manager %%%%%
        define('_MD_AM_COMMMAN', 'Reacties Beheer');
        define('_MD_AM_LISTCOMM', 'Overzicht van reacties');
        htdocs/modules/system/language/english/admin/avatars.php on lines 1..14
        htdocs/modules/system/language/english/admin/comments.php on lines 1..14
        htdocs/modules/system/language/francais/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/francais/admin/comments.php on lines 1..12
        htdocs/modules/system/language/italiano/admin/avatars.php on lines 1..19
        htdocs/modules/system/language/italiano/admin/comments.php on lines 1..18
        htdocs/modules/system/language/nederlands/admin/avatars.php on lines 1..13

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

        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 ($files[$i]->getVar('tpl_type') == 'block') {
                                    $path = $tplset . '/templates/' . $files[$i]->getVar('tpl_module') . '/blocks/' . $files[$i]->getVar('tpl_file');
                                    $xml .= "\r\n    <template name=\"" . $files[$i]->getVar('tpl_file') . "\">\r\n      <module>" . $files[$i]->getVar('tpl_module') . "</module>\r\n      <type>block</type>\r\n      <lastModified>" . $files[$i]->getVar('tpl_lastmodified') . "</lastModified>\r\n    </template>";
                                } elseif ($files[$i]->getVar('tpl_type') == 'module') {
                                    $path = $tplset . '/templates/' . $files[$i]->getVar('tpl_module') . '/' . $files[$i]->getVar('tpl_file');
        Severity: Major
        Found in htdocs/modules/system/admin/tplsets/main.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/tplsets/main.php on lines 690..693

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

        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

                foreach ($_GET as $key => $val) {
                    if (substr($key, -2) == 'id' && !is_array($_GET[$key])) {
                        $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
                        $_GET[$key] = $newval;
                        if ($_REQUEST[$key] == $_GET[$key]) {
        htdocs/install/modules/protector/trust_path/modules/protector/class/protector.php on lines 485..493
        htdocs/install/modules/protector/trust_path/modules/protector/class/protector.php on lines 494..502

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

        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 ($items_atasks as $task) {
                        $taskID = (int) ($task->getVar('sat_addon_id'));
                        $atasks[$taskID]['enabled'] = $task->getVar('sat_enabled');
                        $atasks[$taskID]['repeat'] = $task->getVar('sat_repeat');
                        $atasks[$taskID]['interval'] = $task->getVar('sat_interval');
        Severity: Major
        Found in htdocs/install/modulesadmin.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 1331..1337

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

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

        <?php
        // $Id: avatars.php 21846 2011-06-23 16:37:07Z phoenyx $
        //%%%%%% Avatar Manager %%%%%
        define('_MD_AVATARMAN', 'Gestionnaire d\'avatars');
        define('_MD_SYSAVATARS', 'Avatars syst&egrave;mes');
        Severity: Major
        Found in htdocs/modules/system/language/francais/admin/avatars.php and 7 other locations - About 1 hr to fix
        htdocs/modules/system/language/english/admin/avatars.php on lines 1..14
        htdocs/modules/system/language/english/admin/comments.php on lines 1..14
        htdocs/modules/system/language/francais/admin/comments.php on lines 1..12
        htdocs/modules/system/language/italiano/admin/avatars.php on lines 1..19
        htdocs/modules/system/language/italiano/admin/comments.php on lines 1..18
        htdocs/modules/system/language/nederlands/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/nederlands/admin/comments.php on lines 1..12

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

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

        <?php
        // 08/2008 Updated and adapted for ImpressCMS by evoc - webmaster of www.impresscms.it
        // Published by ImpressCMS Italian Official Support Site - www.impresscms.it
        // Updated by Ianez - Xoops Italia Staff
        // Original translation by Marco Ragogna (blueangel)
        Severity: Major
        Found in htdocs/modules/system/language/italiano/admin/comments.php and 7 other locations - About 1 hr to fix
        htdocs/modules/system/language/english/admin/avatars.php on lines 1..14
        htdocs/modules/system/language/english/admin/comments.php on lines 1..14
        htdocs/modules/system/language/francais/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/francais/admin/comments.php on lines 1..12
        htdocs/modules/system/language/italiano/admin/avatars.php on lines 1..19
        htdocs/modules/system/language/nederlands/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/nederlands/admin/comments.php on lines 1..12

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

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

        <?php
        // $Id: comments.php 22476 2011-08-30 16:33:29Z phoenyx $
        //%%%%%% Comment Manager %%%%%
        define('_MD_AM_COMMMAN', 'Gestion des commentaires');
        define('_MD_AM_LISTCOMM', 'Liste des commentaires');
        Severity: Major
        Found in htdocs/modules/system/language/francais/admin/comments.php and 7 other locations - About 1 hr to fix
        htdocs/modules/system/language/english/admin/avatars.php on lines 1..14
        htdocs/modules/system/language/english/admin/comments.php on lines 1..14
        htdocs/modules/system/language/francais/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/italiano/admin/avatars.php on lines 1..19
        htdocs/modules/system/language/italiano/admin/comments.php on lines 1..18
        htdocs/modules/system/language/nederlands/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/nederlands/admin/comments.php on lines 1..12

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

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

        <?php
        // $Id: avatars.php 11285 2011-06-23 16:37:07Z phoenyx $
        //%%%%%% Avatar Manager %%%%%
        define('_MD_AVATARMAN', 'Pasfoto beheer');
        define('_MD_SYSAVATARS', 'Systeem pasfoto\'s');
        htdocs/modules/system/language/english/admin/avatars.php on lines 1..14
        htdocs/modules/system/language/english/admin/comments.php on lines 1..14
        htdocs/modules/system/language/francais/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/francais/admin/comments.php on lines 1..12
        htdocs/modules/system/language/italiano/admin/avatars.php on lines 1..19
        htdocs/modules/system/language/italiano/admin/comments.php on lines 1..18
        htdocs/modules/system/language/nederlands/admin/comments.php on lines 1..12

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

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

        <?php
        // $Id: avatars.php 11285 2011-06-23 16:37:07Z phoenyx $
        //%%%%%% Avatar Manager %%%%%
        define('_MD_AVATARMAN','Avatar Manager');
        
        
        Severity: Major
        Found in htdocs/modules/system/language/english/admin/avatars.php and 7 other locations - About 1 hr to fix
        htdocs/modules/system/language/english/admin/comments.php on lines 1..14
        htdocs/modules/system/language/francais/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/francais/admin/comments.php on lines 1..12
        htdocs/modules/system/language/italiano/admin/avatars.php on lines 1..19
        htdocs/modules/system/language/italiano/admin/comments.php on lines 1..18
        htdocs/modules/system/language/nederlands/admin/avatars.php on lines 1..13
        htdocs/modules/system/language/nederlands/admin/comments.php on lines 1..12

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

        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

                foreach ($_POST as $key => $val) {
                    if (substr($key, -2) == 'id' && !is_array($_POST[$key])) {
                        $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
                        $_POST[$key] = $newval;
                        if ($_REQUEST[$key] == $_POST[$key]) {
        htdocs/install/modules/protector/trust_path/modules/protector/class/protector.php on lines 476..484
        htdocs/install/modules/protector/trust_path/modules/protector/class/protector.php on lines 494..502

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

        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

                foreach ($_COOKIE as $key => $val) {
                    if (substr($key, -2) == 'id' && !is_array($_COOKIE[$key])) {
                        $newval = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
                        $_COOKIE[$key] = $newval;
                        if ($_REQUEST[$key] == $_COOKIE[$key]) {
        htdocs/install/modules/protector/trust_path/modules/protector/class/protector.php on lines 476..484
        htdocs/install/modules/protector/trust_path/modules/protector/class/protector.php on lines 485..493

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

        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 (function_exists('xoops_module_update_' . $ModName)) {
                        $func = 'xoops_module_update_' . $ModName;
                        if (!$func($module, $prev_version, $prev_dbversion)) {
                            $msgs[] = sprintf(_MD_AM_FAIL_EXEC, '<strong>' . $func . '</strong>');
                        } else {
        Severity: Major
        Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 1382..1390

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

        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 (function_exists('icms_module_update_' . $ModName)) {
                        $func = 'icms_module_update_' . $ModName;
                        if (!$func($module, $prev_version, $prev_dbversion)) {
                            $msgs[] = sprintf(_MD_AM_FAIL_EXEC, '<strong>' . $func . '</strong>');
                        } else {
        Severity: Major
        Found in htdocs/modules/system/admin/modulesadmin/modulesadmin.php and 1 other location - About 1 hr to fix
        htdocs/modules/system/admin/modulesadmin/modulesadmin.php on lines 1374..1390

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

        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