Showing 573 of 5,122 total issues
Function destroy
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
destroy : function( table, removeClasses, callback ) {
table = $( table )[ 0 ];
if ( !table.hasInitialized ) { return; }
// remove all widgets
ts.removeWidget( table, true, false );
Function toggleClass
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggleClass: function( value, stateVal ) {
var type = typeof value,
isValidValue = type === "string" || Array.isArray( value );
if ( typeof stateVal === "boolean" && isValidValue ) {
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function on( elem, types, selector, data, fn, one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
Function applyWidgetId
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
applyWidgetId : function( table, id, init ) {
table = $(table)[0];
var applied, time, name,
c = table.config,
wo = c.widgetOptions,
Function findRange
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
findRange: function( c, val, ignoreRanges ) {
// look for multiple columns '1-3,4-6,8' in data-column
var temp, ranges, range, start, end, singles, i, indx, len,
columns = [];
if ( /^[0-9]+$/.test( val ) ) {
Function findRange
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
findRange: function( c, val, ignoreRanges ) {
// look for multiple columns '1-3,4-6,8' in data-column
var temp, ranges, range, start, end, singles, i, indx, len,
columns = [];
if ( /^[0-9]+$/.test( val ) ) {
Function applyWidgetId
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
applyWidgetId : function( table, id, init ) {
table = $(table)[0];
var applied, time, name,
c = table.config,
wo = c.widgetOptions,
Method displayCategory
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function displayCategory(Categories $categoryObj, $level = 0): void
{
$helper = Helper::getInstance();
$configurator = new Common\Configurator();
$icons = $configurator->icons;
Function listingDel
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function listingDel($lid, $photo): void
{
global $xoopsDB;
$helper = Helper::getInstance();
$lid = (int)$lid;
- 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 replaceLinks
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function replaceLinks($matches): string
{
$req_string = [];
$add_to_url = '';
switch ($matches[5]) {
- 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 listingDel
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function listingDel($lid, $photo): void
{
global $xoopsDB, $admin_lang;
$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 listingDel
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function listingDel($lid, $photo): void
{
global $xoopsDB, $admin_lang;
$helper = Helper::getInstance();
$lid = (int)$lid;
- 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 index
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function index(): void
{
global $xoopsDB;
$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 rssDisplay
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function rssDisplay(
$url,
$size = 15,
$site = 0
): string {
- 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 handleActions
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function handleActions(BlockData $blockData)
{
$moduleDirNameUpper = \mb_strtoupper(Helper::getInstance()->getDirname());
$bid = Request::getInt('bid', 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 isBlockCloned
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups, bool $redirect = true)
{
\xoops_loadLanguage('admin', 'system');
\xoops_loadLanguage('admin/blocksadmin', 'system');
\xoops_loadLanguage('admin/groups', 'system');
- 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 dispatch
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
dispatch: function( nativeEvent ) {
// Make a writable jQuery.Event from the native event object
var event = jQuery.event.fix( nativeEvent );
Function format
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
format: function(table, c, wo) {
var $tbody, tbodyIndex, $rows, rows, $row, $cells, remove, indx,
$table = c.$table,
$tbodies = c.$tbodies,
sortList = c.sortList,
Function format
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
format: function(table, c, wo) {
var $tbody, tbodyIndex, $rows, rows, $row, $cells, remove, indx,
$table = c.$table,
$tbodies = c.$tbodies,
sortList = c.sortList,
Function appendCache
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
appendCache : function( c, init ) {
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
table = c.table,
$tbodies = c.$tbodies,
rows = [],