Showing 573 of 5,122 total issues
Consider simplifying this complex logical expression. Open
Open
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
wo.uitheme_applied = true;
oldtheme = themesAll[c.appliedTheme] || {};
hasOldTheme = !$.isEmptyObject(oldtheme);
oldremove = hasOldTheme ? [ oldtheme.sortNone, oldtheme.sortDesc, oldtheme.sortAsc, oldtheme.active ].join( ' ' ) : '';
Function checkFilters
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
checkFilters: function( table, filter, skipFirst ) {
var c = table.config,
wo = c.widgetOptions,
filterArray = $.isArray( filter ),
filters = ( filterArray ) ? filter : ts.getFilters( table, true ),
Function $headers
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
var configHeaders, header, column, template, tmp,
$elem = $( elem );
// ignore cell (don't add it to c.$headers) if row has ignoreRow class
if ( ts.getClosest( $elem, 'tr' ).hasClass( c.cssIgnoreRow ) ) { return; }
Function checkFilters
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
checkFilters: function( table, filter, skipFirst ) {
var c = table.config,
wo = c.widgetOptions,
filterArray = $.isArray( filter ),
filters = ( filterArray ) ? filter : ts.getFilters( table, true ),
Function $headers
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
var configHeaders, header, column, template, tmp,
$elem = $( elem );
// ignore cell (don't add it to c.$headers) if row has ignoreRow class
if ( ts.getClosest( $elem, 'tr' ).hasClass( c.cssIgnoreRow ) ) { return; }
Method adslight_search
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adslight_search(
$queryarray,
$andor,
$limit,
$offset,
Method reportAbuse
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function reportAbuse($lid): void
{
global $xoopsConfig, $xoopsDB, $xoopsTheme;
$helper = Helper::getInstance();
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
Method sendFriend
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sendFriend($lid): void
{
global $xoopsDB, $xoopsTheme, $xoopsLogger;
$helper = Helper::getInstance();
$idd = $idde = $iddee = '';
Function makeMySelBox
has a Cognitive Complexity of 15 (exceeds 5 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;
}
- 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 onload
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
preloader.onload = function() {
var $preloader;
var imageHeight;
var imageWidth;
var maxImageHeight;
Function onload
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
preloader.onload = function() {
var $preloader;
var imageHeight;
var imageWidth;
var maxImageHeight;
Function start
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Lightbox.prototype.start = function($link) {
var self = this;
var $window = $(window);
$window.on('resize', $.proxy(this.sizeOverlay, this));
Function addCombinator
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addCombinator( matcher, combinator, base ) {
var dir = combinator.dir,
skip = combinator.next,
key = skip || dir,
checkNonElements = base && key === "parentNode",
Function matcherFromTokens
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
Function start
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Lightbox.prototype.start = function($link) {
var self = this;
var $window = $(window);
$window.on('resize', $.proxy(this.sizeOverlay, this));
Function tokenize
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
Function select
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector || selector) );
Method getDirectoryStatus
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = null)
{
global $pathIcon16;
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
Function val
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val: function( value ) {
var hooks, ret, valueIsFunction,
elem = this[ 0 ];
if ( !arguments.length ) {
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 = [];