Showing 216 of 316 total issues
Method lx_CatsArray
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_CatsArray()
{
global $xoopsDB, $xoopsModuleConfig, $xoopsUser, $xoopsModule;
$myts = \MyTextSanitizer::getInstance();
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
Method __construct
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
$objHandler,
$criteria = null,
$field_name = null,
array $alphabet = [],
$arg_name = 'letter',
Function showTooltip
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function showTooltip(e, tooltipTxt) {
var bodyWidth = Math.max(document.body.clientWidth, document.documentElement.clientWidth) - 20;
if (!dhtmlgoodies_tooltip) {
- Read upRead up
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 lexikon_notify_iteminfo
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function lexikon_notify_iteminfo($category, $item_id)
{
/*global $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
if (empty($xoopsModule) || $xoopsModule->getVar('dirname') != 'lexikon') {
- Read upRead up
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 fadetransition
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
domticker.prototype.fadetransition = function (fadetype, timerid) {
var contentdiv = this.contentdiv;
if (fadetype == "reset")
this.opacitysetting = 0.2;
if (contentdiv.filters && contentdiv.filters[0]) {
- Read upRead up
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 xoops_module_install_lexikon
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_install_lexikon(\XoopsModule $module)
{
$moduleDirName = \basename(\dirname(__DIR__));
$helper = Helper::getInstance();
- Read upRead up
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 rcopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rcopy($src, $dest)
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
return false;
- Read upRead up
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 rmove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rmove($src, $dest)
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
return false;
- Read upRead up
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 recurseCopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function recurseCopy($src, $dst)
{
$dir = \opendir($src);
// @mkdir($dst);
if (!@\mkdir($dst) && !\is_dir($dst)) {
- Read upRead up
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 isBlockCloned
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options = null)
Method setOrder
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function setOrder($bid, $title, $weight, $visible, $side, $bcachetime, $bmodule = null)
Avoid deeply nested control flow statements. Open
if ($counter > 4) {
$counter = 0;
echo '</tr>';
echo '<tr>';
}
Avoid deeply nested control flow statements. Open
if (is_object($submitter)) {
$submitter->setVar('posts', $submitter->getVar('posts') + 1);
$res = $memberHandler->insertUser($submitter, true);
unset($submitter);
}
Function lx_getinit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function lx_getinit($init)
{
global $init;
echo "<div><select name='init'>";
echo "<option value='#'> # </option>";
- Read upRead up
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 categoryDefault
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function categoryDefault()
{
$helper = Helper::getInstance();
$op = 'default';
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
- Read upRead up
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 lexikon_tag_iteminfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function lexikon_tag_iteminfo(&$items)
{
if (empty($items) || !is_array($items)) {
return false;
}
- Read upRead up
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 lx_getWysiwygForm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function &lx_getWysiwygForm($caption, $name, $value = '', $width = '100%', $height = '400px', $supplemental = '')
Function lx_serviceLinks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function lx_serviceLinks($variable)
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $entrytype;
/** @var \XoopsModuleHandler $moduleHandler */
- Read upRead up
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 lexikon_tag_iteminfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function lexikon_tag_iteminfo(&$items)
{
if (empty($items) || !is_array($items)) {
return false;
}
- Read upRead up
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
Avoid deeply nested control flow statements. Open
if (is_file($templateFolder . $v)) {
unlink($templateFolder . $v);
}