File main.php
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
declare(strict_types=1);
/**
Similar blocks of code found in 4 locations. Consider refactoring. Open
$title
= !defined($config_theme->getVar('conf_desc')) || '' == constant($config_theme->getVar('conf_desc')) ? constant($config_theme->getVar('conf_title')) : constant($config_theme->getVar('conf_title'))
. '<br><br><span style="font-weight:normal;">'
. constant($config_theme->getVar('conf_desc')) . '</span>';
- Read upRead up
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 100.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
$title = !defined($config_tplset->getVar('conf_desc')) || '' == constant($config_tplset->getVar('conf_desc')) ? constant($config_tplset->getVar('conf_title')) : constant($config_tplset->getVar('conf_title'))
. '<br><br><span style="font-weight:normal;">'
. constant($config_tplset->getVar('conf_desc')) . '</span>';
- Read upRead up
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 100.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
$title
= !defined($config_debug->getVar('conf_desc')) || '' == constant($config_debug->getVar('conf_desc')) ? constant($config_debug->getVar('conf_title')) : constant($config_debug->getVar('conf_title')) . '<br><br><span style="font-weight:normal;">'
. constant($config_debug->getVar('conf_desc')) . '</span>';
- Read upRead up
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 100.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
$title = !defined($config_startpage->getVar('conf_desc')) || '' == constant($config_startpage->getVar('conf_desc')) ? constant($config_startpage->getVar('conf_title')) : constant($config_startpage->getVar('conf_title'))
. '<br><br><span style="font-weight:normal;">'
. constant($config_startpage->getVar('conf_desc')) . '</span>';
- Read upRead up
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 100.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Only one argument is allowed per line in a multi-line function call Open
$theme_ele = 'theme_multi' !== $config_theme->getVar('conf_formtype') ? new XoopsFormSelect($title, $config_theme->getVar('conf_name'), $config_theme->getConfValueForOutput()) : new XoopsFormSelect($title, $config_theme->getVar('conf_name'),
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
$config_theme->getConfValueForOutput(), 5, true);
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
$config_theme->getConfValueForOutput(), 5, true);
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
$gdlib = '<img src="../images/icons/on.gif" align="absmiddle" alt="' . _AM_XI_DOWN_GDON . '"/><b> ' . $gdversion . '</b>' . _AM_XI_DOWN_GDON;
- Exclude checks
Line exceeds 120 characters; contains 225 characters Open
. '<br><br><span style="font-weight:normal;">'
- Exclude checks
Line exceeds 120 characters; contains 247 characters Open
$config_theme->getConfValueForOutput(), 5, true);
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
$startpage_ele = new XoopsFormSelect($title, $config_startpage->getVar('conf_name'), $config_startpage->getConfValueForOutput());
- Exclude checks
Line exceeds 120 characters; contains 230 characters Open
. constant($config_tplset->getVar('conf_desc')) . '</span>';
- Exclude checks
Line exceeds 120 characters; contains 208 characters Open
. '<br><br><span style="font-weight:normal;">'
- Exclude checks
Line exceeds 120 characters; contains 216 characters Open
. '<br><br><span style="font-weight:normal;">'
- Exclude checks
Line exceeds 120 characters; contains 148 characters Open
$optval = defined($options[$j]->getVar('confop_value')) ? constant($options[$j]->getVar('confop_value')) : $options[$j]->getVar('confop_value');
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
$allow_url_fopen = '<img src="../images/icons/off.gif" align="absmiddle" alt="' . _AM_XI_DOWN_OFF . '" />' . _AM_XI_DOWN_SAFEMODEPROBLEMS;
- Exclude checks
Line exceeds 120 characters; contains 221 characters Open
. constant($config_theme->getVar('conf_desc')) . '</span>';
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
$optkey = defined($options[$j]->getVar('confop_name')) ? constant($options[$j]->getVar('confop_name')) : $options[$j]->getVar('confop_name');
- Exclude checks
Line exceeds 120 characters; contains 148 characters Open
$safemode = '<img src="../images/icons/off.gif" align="absmiddle" alt="' . _AM_XI_DOWN_OFF . '" /><b> ' . _AM_XI_DOWN_SAFEMODEPROBLEMS . '</b>';
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
$gdlib = '<img src="../images/icons/off.gif" align="absmiddle" alt="' . _AM_XI_DOWN_GDOFF . '" /><b> ' . $gdversion . '</n>' . _AM_XI_DOWN_GDOFF;
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
$theme_fromfile_ele = new XoopsFormRadioYN($title, $config_theme_fromfile->getVar('conf_name'), $config_theme_fromfile->getConfValueForOutput(), _YES, _NO);
- Exclude checks
Line exceeds 120 characters; contains 150 characters Open
$sql = 'SELECT conf_id FROM ' . $xoopsDB->prefix('config') . ' WHERE conf_name = "global_disabled" AND conf_modid=' . $isProtector->getVar('mid');
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
$registerglobals = '<img src="../images/icons/off.gif" align="absmiddle" alt="' . _AM_XI_DOWN_OFF . '" />' . _AM_XI_DOWN_SAFEMODEPROBLEMS;
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
$use_trans_sid = '<img src="../images/icons/off.gif" align="absmiddle" alt="' . _AM_XI_DOWN_OFF . '" />' . _AM_XI_DOWN_SAFEMODEPROBLEMS;
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
$precheck = '<img src="../images/icons/off.gif" align="absmiddle" alt="' . _AM_XI_PROTECTOR_PRECHECK_MSG . '" />' . _AM_XI_PROTECTOR_CHECK_ERR;
- Exclude checks
Line exceeds 120 characters; contains 149 characters Open
$postcheck = '<img src="../images/icons/off.gif" align="absmiddle" alt="' . _AM_XI_PROTECTOR_POSTCHECK_MSG . '" />' . _AM_XI_PROTECTOR_CHECK_ERR;
- Exclude checks
Line exceeds 120 characters; contains 242 characters Open
. constant($config_startpage->getVar('conf_desc')) . '</span>';
- Exclude checks
Line exceeds 120 characters; contains 247 characters Open
= !defined($config_debug->getVar('conf_desc')) || '' == constant($config_debug->getVar('conf_desc')) ? constant($config_debug->getVar('conf_title')) : constant($config_debug->getVar('conf_title')) . '<br><br><span style="font-weight:normal;">'
- Exclude checks
Line exceeds 120 characters; contains 216 characters Open
$title = !defined($config_tplset->getVar('conf_desc')) || '' == constant($config_tplset->getVar('conf_desc')) ? constant($config_tplset->getVar('conf_title')) : constant($config_tplset->getVar('conf_title'))
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
$debug_ele = new XoopsFormSelect($title, $config_debug->getVar('conf_name'), $config_debug->getConfValueForOutput(), 5, true);
- Exclude checks
Line exceeds 120 characters; contains 228 characters Open
$title = !defined($config_startpage->getVar('conf_desc')) || '' == constant($config_startpage->getVar('conf_desc')) ? constant($config_startpage->getVar('conf_title')) : constant($config_startpage->getVar('conf_title'))
- Exclude checks
Line exceeds 120 characters; contains 241 characters Open
$theme_ele = 'theme_multi' !== $config_theme->getVar('conf_formtype') ? new XoopsFormSelect($title, $config_theme->getVar('conf_name'), $config_theme->getConfValueForOutput()) : new XoopsFormSelect($title, $config_theme->getVar('conf_name'),
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
$debug_ele = new XoopsFormSelect($title, $config_debug->getVar('conf_name'), $config_debug->getConfValueForOutput());
- Exclude checks
Line exceeds 120 characters; contains 207 characters Open
= !defined($config_theme->getVar('conf_desc')) || '' == constant($config_theme->getVar('conf_desc')) ? constant($config_theme->getVar('conf_title')) : constant($config_theme->getVar('conf_title'))
- Exclude checks
Line exceeds 120 characters; contains 124 characters Open
$tplset_ele = new XoopsFormSelect($title, $config_tplset->getVar('conf_name'), $config_tplset->getConfValueForOutput());
- Exclude checks
Line exceeds 120 characters; contains 214 characters Open
. constant($config_debug->getVar('conf_desc')) . '</span>';
- Exclude checks
Line exceeds 120 characters; contains 145 characters Open
$protector_ele = new XoopsFormRadioYN($title, $config_protector->getVar('conf_name'), $config_protector->getConfValueForOutput(), _YES, _NO);
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
$theme_ele = 'theme_multi' !== $config_theme->getVar('conf_formtype') ? new XoopsFormSelect($title, $config_theme->getVar('conf_name'), $config_theme->getConfValueForOutput()) : new XoopsFormSelect($title, $config_theme->getVar('conf_name'),
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
$config_theme->getConfValueForOutput(), 5, true);
- Exclude checks
Multi-line function call not indented correctly; expected 0 spaces but found 198 Open
$config_theme->getConfValueForOutput(), 5, true);
- Exclude checks