Showing 573 of 5,122 total issues
Function build
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Lightbox.prototype.build = function() {
if ($('#lightbox').length > 0) {
return;
}
Function done
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
// Ignore repeat invocations
File addlisting.php
has 278 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
Consider simplifying this complex logical expression. Open
Open
if ( forward && useCache ) {
// Seek `elem` from a previously-cached index
// ...in a gzip-friendly way
Function setMatcher
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
Function superMatcher
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
Function loadTableFromArrayWithReplace
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace): int
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
- 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 bindEvents
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bindEvents : function( table, $headers, core ) {
table = $( table )[ 0 ];
var tmp,
c = table.config,
namespace = c.namespace,
Function bindEvents
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bindEvents : function( table, $headers, core ) {
table = $( table )[ 0 ];
var tmp,
c = table.config,
namespace = c.namespace,
Method xoops_module_update_adslight
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function xoops_module_update_adslight(\XoopsModule $module, $previousVersion = null): bool
{
global $xoopsDB;
$moduleDirName = \basename(\dirname(__DIR__));
$helper = Helper::getInstance();
Method mailAd
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mailAd($lid, $yname, $ymail, $fname, $fmail): void
{
global $xoopsConfig, $xoopsTpl, $xoopsDB, $xoopsModule, $myts;
$helper = Helper::getInstance();
Method adsNewCat
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function adsNewCat($cid): void
{
global $xoopsDB, $myts;
$helper = Helper::getInstance();
$mytree = new Tree($xoopsDB->prefix('adslight_categories'), 'cid', 'pid');
Method mailAd
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mailAd($lid, $yname, $ymail, $fname, $fmail): void
{
global $xoopsConfig, $xoopsTpl, $xoopsDB, $xoopsModule, $myts;
$helper = Helper::getInstance();
if ('1' === $helper->getConfig('adslight_use_captcha')) {
Method truncateHtml
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function truncateHtml(
string $text,
?int $length = 100,
string $ending = '...',
bool $exact = false,
Method modifyAdsS
has 20 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$lid,
$cat,
$title,
$status,
$expire,
Method modifyAds
has 20 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$lid,
$cat,
$title,
$status,
$expire,
Method modifyAdsS
has 20 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$lid,
$cat,
$title,
$status,
$expire,
Method listingValid
has 20 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$lid,
$cid,
$title,
$status,
$expire,
Method listingValid
has 20 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$lid,
$cat,
$title,
$status,
$expire,
Utility
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Utility extends Common\SysUtility
{
//--------------- Custom module methods -----------------------------
/**
* @return void