Showing 85 of 103 total issues
Function b_marquee_comments
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_comments($limit, $dateFormat, $itemsSize)
{
// require_once XOOPS_ROOT_PATH . '/modules/marquee/class/Utility.php';
require XOOPS_ROOT_PATH . '/include/comment_constants.php';
$block = [];
- 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 AddEditMarqueeForm
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function AddEditMarqueeForm(
$marqueeid,
$action,
$formTitle,
$contentvalue,
- 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 b_marquee_tplleaguestats
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_tplleaguestats($limit, $dateFormat, $itemsSize)
{
// require_once XOOPS_ROOT_PATH . '/modules/marquee/class/Utility.php';
//######################## SETTINGS ######################
$displaySeason = false; // display season name?
- 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 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 formMarkRequiredFields
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function formMarkRequiredFields($sform)
{
$required = $elements = [];
if (self::needsAsterisk()) {
foreach ($sform->getRequired() as $item) {
- 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 setOrder
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function setOrder($bid, $title, $weight, $visible, $side, $bcachetime, $bmodule = null)
Method isBlockCloned
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options = null): void
Function b_marquee_smartfaq
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_smartfaq($limit, $dateFormat, $itemsSize)
{
require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
$block = [];
$smartModule = &sf_getModuleInfo();
- 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 getWysiwygForm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$caption,
$name,
$value = '',
$width = '100%',
$height = '400px',
Function b_marquee_smartsection
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_smartsection($limit, $dateFormat, $itemsSize)
{
if (!class_exists('XoopsModules\Smartsection\Helper')) {
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);
}
Function b_marquee_smartclient
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_smartclient($limit, $dateFormat, $itemsSize)
{
$block = [];
if (!defined('SMARTCLIENT_DIRNAME')) {
define('SMARTCLIENT_DIRNAME', 'smartclient');
- 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 xoopspartners_random
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function xoopspartners_random($numberPartners, $random = true, $orden = '', $desc = '')
{
global $xoopsDB;
$PartnersId = [];
$ArrayReturn = [];
- 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 truncateHtml
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
Function b_marquee_article
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_article($limit, $dateFormat, $itemsSize)
{
global $xoopsDB;
// require_once XOOPS_ROOT_PATH . '/modules/marquee/class/Utility.php';
require_once XOOPS_ROOT_PATH . '/modules/article/include/functions.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 b_marquee_wfdownloads
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_wfdownloads($limit, $dateFormat, $itemsSize)
{
$block = [];
global $xoopsUser;
/** @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 b_marquee_news
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function b_marquee_news($limit, $dateFormat, $itemsSize)
{
// require_once XOOPS_ROOT_PATH . '/modules/marquee/class/Utility.php';
require_once XOOPS_ROOT_PATH . '/modules/news/class/class.newsstory.php';
$block = $stories = [];
- 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 myglob
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function myglob($folder = '', $pattern = 'php')
{
$result = [];
if (!($dir = opendir($folder))) {
- 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 getEditor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getEditor($helper = null, $options = null)
{
/** @var Helper $helper */
if (null === $options) {
$options = [];
- 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"