Showing 573 of 5,122 total issues
File Tree.php
has 362 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
namespace XoopsModules\Adslight;
/*
Method expireAd
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function expireAd(): void
{
global $xoopsDB, $xoopsConfig, $xoopsModule, $myts, $meta;
$helper = Helper::getInstance();
Function processRow
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
processRow: function( c, data, vars ) {
var result, filterMatched,
fxn, ffxn, txt,
wo = c.widgetOptions,
showRow = true,
Function processRow
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
processRow: function( c, data, vars ) {
var result, filterMatched,
fxn, ffxn, txt,
wo = c.widgetOptions,
showRow = true,
Method index
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
function index(): void
{
global $xoopsDB, $myts, $admin_lang;
// require_once __DIR__ . '/admin_header.php';
xoops_cp_header();
Function modifyAd
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function modifyAd($lid): void
{
global $xoopsDB, $xoopsModule, $xoopsConfig, $myts, $desctext;
$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 modifyAds
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
function modifyAds($lid): void
{
global $xoopsDB, $myts, $desctext, $admin_lang;
$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
Function setup
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup : function( table, c ) {
// if no thead or tbody, or tablesorter is already present, quit
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
if ( ts.debug(c, 'core') ) {
if ( table.hasInitialized ) {
Function setup
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup : function( table, c ) {
// if no thead or tbody, or tablesorter is already present, quit
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
if ( ts.debug(c, 'core') ) {
if ( table.hasInitialized ) {
Function then
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
then: function( onFulfilled, onRejected, onProgress ) {
var maxDepth = 0;
function resolve( depth, deferred, handler, special ) {
return function() {
var that = this,
Function format
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
format: function(table, c, wo) {
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
themesAll = ts.themes,
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
Function format
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
format: function(table, c, wo) {
var i, tmp, hdr, icon, time, $header, $icon, $tfoot, $h, oldtheme, oldremove, oldIconRmv, hasOldTheme,
themesAll = ts.themes,
$table = c.$table.add( $( c.namespace + '_extra_table' ) ),
$headers = c.$headers.add( $( c.namespace + '_extra_headers' ) ),
Function Animation
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = Animation.prefilters.length,
Method adsModCat
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function adsModCat($cid): void
{
global $xoopsDB, $myts;
$helper = Helper::getInstance();
$mytree = new Tree($xoopsDB->prefix('adslight_categories'), 'cid', 'pid');
Method render
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render(?array $block = null): void
{
\xoops_load('XoopsFormLoader');
\xoops_loadLanguage('common', $this->moduleDirNameUpper);
Method __construct
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($target)
{
$this->helper = $target->helper;
$this->targetObject = $target;
Function trigger
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem, onlyHandlers ) {
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement,
eventPath = [ elem || document ],
type = hasOwn.call( event, "type" ) ? event.type : event,
Method adslight_b2_show
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function adslight_b2_show($options)
{
if (!class_exists(Helper::class)) {
return [];
}
Function indexView
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function indexView($lid = null): void
{
global $xoopsDB, $myts, $desctext, $admin_lang;
$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
Function indexView
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function indexView($lid): void
{
global $xoopsDB, $xoopsModule, $myts, $desctext, $admin_lang;
$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"