Showing 573 of 5,122 total issues
Function handler
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
handler: function( event ) {
var notAsync, result,
saved = dataPriv.get( this, type );
if ( ( event.isTrigger & 1 ) && this[ type ] ) {
Method rssDisplayForum
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function rssDisplayForum(
$url,
$size = 15,
$site = 0,
$withdate = 0
Method loadTableFromArrayWithReplace
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace): int
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
Method replaceLinks
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function replaceLinks($matches): string
{
$req_string = [];
$add_to_url = '';
switch ($matches[5]) {
Method receivePicture
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function receivePicture(
$title,
$pathUpload,
$thumbwidth,
$thumbheight,
Method cloneRecord
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function cloneRecord(string $tableName, string $idField, int $id): ?int
{
$newId = null;
$tempTable = '';
$table = $GLOBALS['xoopsDB']->prefix($tableName);
Method processOrderBlockAction
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processOrderBlockAction(BlockData $blockData)
{
$blockData->bid = Request::getArray('bid', []);
$blockData->oldtitle = Request::getArray('oldtitle', [], 'POST');
$blockData->oldside = Request::getArray('oldside', [], 'POST');
Method getFileStatus
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getFileStatus($file_path, $original_file_path = null, $redirectFile = null)
{
global $pathIcon16;
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
Function rssDisplayForum
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function rssDisplayForum(
$url,
$size = 15,
$site = 0,
$withdate = 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 adsModCatS
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
$cidd,
$cid,
$img,
$title,
$cat_desc,
Function adslight_search
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function adslight_search(
$queryarray,
$andor,
$limit,
$offset,
- 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 resizeImage
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function resizeImage(
$img,
$thumbwidth,
$thumbheight,
$pictwidth,
- 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 getModuleOption
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getModuleOption($option, $repmodule = 'adslight')
{
global $xoopsModule;
$helper = \XoopsModules\Adslight\Helper::getInstance();
static $tbloptions = [];
- 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 rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function rrmdir(string $src): bool
{
// 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 makeAdSelBox
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function makeAdSelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = ''): void
{
global $myts, $xoopsDB;
$helper = Helper::getInstance();
$pathIcon16 = Admin::iconUrl('', '16');
- 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 load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );
Function removeWidget
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
removeWidget : function( table, name, refreshing ) {
table = $( table )[ 0 ];
var index, widget, indx, len,
c = table.config;
// if name === true, add all widgets from $.tablesorter.widgets
Method listingAddcondition
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function listingAddcondition($type): void
{
global $xoopsDB, $xoopsConfig, $myts, $admin_lang;
$helper = Helper::getInstance();
$type = \htmlspecialchars($type, ENT_QUOTES | ENT_HTML5);
Function removeWidget
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
removeWidget : function( table, name, refreshing ) {
table = $( table )[ 0 ];
var index, widget, indx, len,
c = table.config;
// if name === true, add all widgets from $.tablesorter.widgets
Method getServerStats
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getServerStats(): string
{
//mb $wfdownloads = WfdownloadsWfdownloads::getInstance();
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);