Showing 374 of 649 total issues
Function reOrder
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function reOrder(hookPt, fnRef, order) {
if (!order || typeof order == 'undefined' || typeof order == 'number') return;
var newPt = new Array(), match;
if (typeof order == 'function') {
if (typeof fnRef == 'object') {
Method sendNotifications
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function sendNotifications($notifications = []): void
{
$smartModule = Smartfaq\Utility::getModuleInfo();
$myts = MyTextSanitizer::getInstance();
Method getFaqs
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFaqs(
$limit = 0,
$start = 0,
$status = '',
$categoryid = -1,
File SmartDbTable.php
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
namespace XoopsModules\Smartfaq;
/**
Method isBlockCloned
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups): void
{
\xoops_loadLanguage('admin', 'system');
\xoops_loadLanguage('admin/blocksadmin', 'system');
\xoops_loadLanguage('admin/groups', 'system');
Function parseShadowExtras
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function parseShadowExtras(pf, i, ar) {
var k = i, v;
if (k < ar.length) {
if (ar[k] == SHADOW) {
- 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 runHook
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function runHook(fnHookTo, hookType) {
var l = hookPts[fnHookTo], optPm, arS, ar = runHook.arguments;
if (hookType == FREPLACE) {
arS = argToString(ar, 2);
if (typeof l == 'undefined' || !(l = l.ovload)) return eval(fnHookTo + '(' + arS + ')'); else return eval('l(' + arS + ')');
- 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 runHook
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function runHook(fnHookTo, hookType) {
var l = hookPts[fnHookTo], optPm, arS, ar = runHook.arguments;
if (hookType == FREPLACE) {
arS = argToString(ar, 2);
- 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 parseShadowExtras
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function parseShadowExtras(pf, i, ar) {
var k = i, v;
if (k < ar.length) {
if (ar[k] == SHADOW) {
eval(pf + 'shadow=(' + pf + 'shadow==0)?1: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
Method b_faqs_recent_show
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_faqs_recent_show($options)
{
// require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
$myts = \MyTextSanitizer::getInstance();
Method render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
// load all child ids for javascript codes
foreach (\array_keys($this->_itemTree) as $item_id) {
$this->_itemTree[$item_id]['allchild'] = [];
Function nd
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function nd(time) {
if (olLoaded && !isExclusive()) {
if (time && !o3_delay) {
if (o3_timerid > 0) clearTimeout(o3_timerid);
o3_timerid = setTimeout("cClick()", (o3_timeout = time));
- 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 nd
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function nd(time) {
if (olLoaded && !isExclusive()) {
if (time && !o3_delay) {
if (o3_timerid > 0) clearTimeout(o3_timerid);
- 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 orderBlock
has 15 arguments (exceeds 4 allowed). Consider refactoring. Open
array $bid,
array $oldtitle,
array $oldside,
array $oldweight,
array $oldvisible,
Method sf_attachmentImage
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sf_attachmentImage($source)
{
/** @var Smartfaq\Helper $helper */
$helper = Smartfaq\Helper::getInstance();
Function getFrmRef
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function getFrmRef(srcFrm, tgetFrm) {
var rtnVal = ''
if (tgetFrm != srcFrm) {
var tFrm = frmDepth(top.frames, tgetFrm)
- 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 getFrmRef
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function getFrmRef(srcFrm, tgetFrm) {
var rtnVal = ''
if (tgetFrm != srcFrm) {
var tFrm = frmDepth(top.frames, tgetFrm)
var sFrm = frmDepth(top.frames, srcFrm)
- 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 showSelectBox
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function showSelectBox() {
if (olNs4 || olOp || olIe55) return;
var selEl, v;
if (olIe4) v = 0; else {
v = navigator.userAgent.match(/Gecko\/(\d{8})/i);
- 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 showSelectBox
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function showSelectBox() {
if (olNs4 || olOp || olIe55) return;
var selEl, v;
if (olIe4) v = 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 faqAccessGranted
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function faqAccessGranted($faqObj)
{
global $xoopsUser;
if (self::userIsAdmin()) {
- 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"