Showing 573 of 5,122 total issues
Function adslight_b2_show
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
Open
function adslight_b2_show($options)
{
if (!class_exists(Helper::class)) {
return [];
}
- 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
File index.php
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
/*
-------------------------------------------------------------------------
ADSLIGHT 2 : Module for Xoops
Function bindMethods
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bindMethods : function( c ) {
var $table = c.$table,
namespace = c.namespace,
events = ( 'sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete ' +
'sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup ' +
Function bindMethods
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bindMethods : function( c ) {
var $table = c.$table,
namespace = c.namespace,
events = ( 'sortReset update updateRows updateAll updateHeaders addRows updateCell updateComplete ' +
'sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup ' +
Function buildRow
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildRow: function( table, c, wo ) {
var $filter, col, column, $header, makeSelect, disabled, name, ffxn, tmp,
// c.columns defined in computeThIndexes()
cellFilter = wo.filter_cellFilter,
columns = c.columns,
Function buildRow
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildRow: function( table, c, wo ) {
var $filter, col, column, $header, makeSelect, disabled, name, ffxn, tmp,
// c.columns defined in computeThIndexes()
cellFilter = wo.filter_cellFilter,
columns = c.columns,
Method listingValid
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function listingValid(
$lid,
$cat,
$title,
$status,
Function setupParsers
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupParsers : function( c, $tbodies ) {
var rows, list, span, max, colIndex, indx, header, configHeaders,
noParser, parser, extractor, time, tbody, len,
table = c.table,
tbodyIndex = 0,
Function setupParsers
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setupParsers : function( c, $tbodies ) {
var rows, list, span, max, colIndex, indx, header, configHeaders,
noParser, parser, extractor, time, tbody, len,
table = c.table,
tbodyIndex = 0,
Method getMoneyFormat
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function getMoneyFormat(
$format,
$number
) {
$regex = '/%((?:[\^!\-]|\+|\(|\=.)*)(\d+)?' . '(?:#(\d+))?(?:\.(\d+))?([in%])/';
Function buildHeaders
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildHeaders : function( c ) {
var $temp, icon, timer, indx;
c.headerList = [];
c.headerContent = [];
c.sortVars = [];
Function buildHeaders
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildHeaders : function( c ) {
var $temp, icon, timer, indx;
c.headerList = [];
c.headerContent = [];
c.sortVars = [];
Method listingValid
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function listingValid(
$lid,
$cid,
$title,
$status,
File members.php
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
File category.php
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
/*
* You may not change or alter any portion of this comment or credits
* of supporting developers from this source code or any supporting source code
File PicturesHandler.php
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php declare(strict_types=1);
namespace XoopsModules\Adslight;
/*
Method printAd
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function printAd($lid): void
{
global $xoopsConfig, $xoopsDB, $useroffset, $myts;
$helper = Helper::getInstance();
$currenttheme = $xoopsConfig['theme_set'];
Function CHILD
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
Function Sizzle
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var m, i, elem, nid, match, groups, newSelector,
newContext = context && context.ownerDocument,
// nodeType defaults to 9, since context defaults to document
Function send
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
send: function( headers, complete ) {
var i,
xhr = options.xhr();
xhr.open(