Showing 374 of 649 total issues
Function myblocksadmin_update_block
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
function myblocksadmin_update_block(
$bid,
$bside,
$bweight,
$bvisible,
- 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 getFaqsFromSearch
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function getFaqsFromSearch($queryarray = [], $andor = 'AND', $limit = 0, $offset = 0, $userid = 0)
{
global $xoopsUser;
$ret = [];
- 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 sf_createThumbnail
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sf_createThumbnail($source, $thumb_width)
{
/** @var Smartfaq\Helper $helper */
$helper = Smartfaq\Helper::getInstance();
Function getContextualFaqs
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function getContextualFaqs($limit = 0)
{
$ret = false;
$otherCriteria = new \CriteriaCompo();
- 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 render
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render(?array $block = null)
{
\xoops_load('XoopsFormLoader');
\xoops_loadLanguage('common', $this->moduleDirNameUpper);
File main.php
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/**
* Module: SmartFAQ
* Author: The SmartFactory <www.smartfactory.ca>
Method getFaqsFromSearch
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFaqsFromSearch($queryarray = [], $andor = 'AND', $limit = 0, $offset = 0, $userid = 0)
{
global $xoopsUser;
$ret = [];
Method editfaq
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editfaq(string $faqid = ''): void
{
global $answerHandler, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModule, $XOOPS_URL, $myts, $pathIcon16;
/** @var Smartfaq\Helper $helper */
$helper = Helper::getInstance();
Function registerHook
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function registerHook(fnHookTo, fnRef, hookType, optPm) {
var hookPt, last = typeof optPm;
if (fnHookTo == 'plgIn' || fnHookTo == 'postParse') return;
if (typeof hookPts == 'undefined') hookPts = new Array();
- 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 registerHook
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
function registerHook(fnHookTo, fnRef, hookType, optPm) {
var hookPt, last = typeof optPm;
if (fnHookTo == 'plgIn' || fnHookTo == 'postParse') return;
if (typeof hookPts == 'undefined') hookPts = new Array();
if (typeof hookPts[fnHookTo] == 'undefined') hookPts[fnHookTo] = new FunctionReference();
- 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 generateShadow
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateShadow(content) {
var wd, ht, X = 0, Y = 0, zIdx = 0, txt, dpObj, puObj, bS = '', aPos, posStr = new Array();
if (!o3_shadow || (o3_shadowx == 0 && o3_shadowy == 0)) return;
Function generateShadow
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateShadow(content) {
var wd, ht, X = 0, Y = 0, zIdx = 0, txt, dpObj, puObj, bS = '', aPos, posStr = new Array();
if (!o3_shadow || (o3_shadowx == 0 && o3_shadowy == 0)) return;
X = Math.abs(o3_shadowx);
Y = Math.abs(o3_shadowy);
File CategoryHandler.php
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
namespace XoopsModules\Smartfaq;
/**
Function scroll_placeLayer
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function scroll_placeLayer() {
var placeX, placeY, widthFix = 0;
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
// HORIZONTAL PLACEMENT
Function scroll_placeLayer
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
function scroll_placeLayer() {
var placeX, placeY, widthFix = 0;
var hasAnchor = (typeof o3_anchor != 'undefined' && o3_anchor);
if (eval('o3_frame.' + docRoot) && eval("typeof o3_frame." + docRoot + ".clientWidth=='number'") && eval('o3_frame.' + docRoot + '.clientWidth')) {
iwidth = eval('o3_frame.' + docRoot + '.clientWidth');
SmartDbTable
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class SmartDbTable
{
/**
* @var string $_name name of the table
*/
Function anchorPlaceLayer
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function anchorPlaceLayer() {
var placeX, placeY, widthFix = 0;
if (eval('o3_frame.' + docRoot) && eval("typeof o3_frame." + docRoot + ".clientWidth=='number'") && eval('o3_frame.' + docRoot + '.clientWidth')) {
iwidth = eval('o3_frame.' + docRoot + '.clientWidth');
} else if (typeof(o3_frame.innerWidth) == 'number') {
Function anchorPlaceLayer
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
function anchorPlaceLayer() {
var placeX, placeY, widthFix = 0;
// HORIZONTAL PLACEMENT
if (eval('o3_frame.' + docRoot) && eval("typeof o3_frame." + docRoot + ".clientWidth == 'number'") && eval('o3_frame.' + docRoot + '.clientWidth')) {
File overlib_anchor.js
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
//\/////
//\ overLIB Anchor Plugin
//\ This file requires overLIB 4.00 or later.
//\
//\ overLIB 4.05 - You may not remove or change this notice.
Method editfaq
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editfaq($showmenu = false, $faqid = -1): void
{
global $faqHandler, $categoryHandler, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModule, $XOOPS_URL, $myts;
/** @var Smartfaq\Helper $helper */
$helper = Smartfaq\Helper::getInstance();