Showing 573 of 5,122 total issues
Function updateHeaderSortCount
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateHeaderSortCount : function( c, list ) {
var col, dir, group, indx, primary, temp, val, order,
sortList = list || c.sortList,
len = sortList.length;
c.sortList = [];
Function data
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;
Function leverageNative
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function leverageNative( el, type, expectSync ) {
// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
if ( !expectSync ) {
if ( dataPriv.get( el, type ) === undefined ) {
Function getColumnText
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getColumnText : function( table, column, callback, rowFilter ) {
table = $( table )[0];
var tbodyIndex, rowIndex, cache, row, tbodyLen, rowLen, raw, parsed, $cell, result,
hasCallback = typeof callback === 'function',
allColumns = column === 'all',
Function getColumnText
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getColumnText : function( table, column, callback, rowFilter ) {
table = $( table )[0];
var tbodyIndex, rowIndex, cache, row, tbodyLen, rowLen, raw, parsed, $cell, result,
hasCallback = typeof callback === 'function',
allColumns = column === 'all',
Method adslightMaps
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adslightMaps(): void
{
global $xoopsDB, $xoopsConfig, $xoopsModule, $myts, $prem_perm;
$GLOBALS['xoopsOption']['template_main'] = 'adslight_maps.tpl';
Function adsNewCat
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
function adsNewCat($cid): void
{
global $xoopsDB, $myts;
$helper = Helper::getInstance();
$mytree = new Tree($xoopsDB->prefix('adslight_categories'), 'cid', 'pid');
- 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 14 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
array $bid,
array $oldtitle,
array $oldside,
array $oldweight,
array $oldvisible,
Function extend
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
Method makeAdSelBox
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
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');
Method makeMySelBox
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = ''): void
{
if ('' === $sel_name) {
$sel_name = $this->id;
}
Method insert
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function insert(\XoopsObject $object, $force = false): bool
{
global $lid;
if (!$object instanceof Pictures) {
return false;
Method updateBlock
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateBlock(int $bid, string $btitle, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups)
{
$myblock = new \XoopsBlock($bid);
$myblock->setVar('title', $btitle);
$myblock->setVar('weight', $bweight);
Method adslight_absolutize
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adslight_absolutize($s)
{
if (preg_match('/\/$/', $_SERVER['REQUEST_URI'])) {
$req_dir = preg_replace('/\/$/', '', $_SERVER['REQUEST_URI']);
$req_php = '';
Method checkVerModule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function checkVerModule(Helper $helper, ?string $source = 'github', ?string $default = 'master'): ?array
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
$update = '';
Function adjustCSS
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adjustCSS( elem, prop, valueParts, tween ) {
var adjusted, scale,
maxIterations = 20,
currentValue = tween ?
function() {
Function access
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
len = elems.length,
bulk = key == null;
Function stop
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
Function style
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
style: function( elem, name, value, extra ) {
// Don't set styles on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
return;
Function destroy
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
destroy : function( table, removeClasses, callback ) {
table = $( table )[ 0 ];
if ( !table.hasInitialized ) { return; }
// remove all widgets
ts.removeWidget( table, true, false );