Showing 216 of 316 total issues
Method entrySave
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
function entrySave($entryID = '')
{
global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsDB;
$helper = Helper::getInstance();
$utility = new Utility();
Function entryEdit
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function entryEdit($entryID = '')
{
global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $init;
$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 b_lxspot_show
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function b_lxspot_show($options)
{
global $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer:: getInstance();
xoops_load('XoopsUserUtility');
- 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 myblocksadmin_update_block
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
function myblocksadmin_update_block(
$bid,
$bside,
$bweight,
$bvisible,
- 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 DefinitionImport
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
function DefinitionImport($delete)
{
global $xoopsConfig, $xoopsDB, $xoopsModule, $myts;
$sqlQuery = $xoopsDB->query('SELECT count(id) AS count FROM ' . $xoopsDB->prefix('dictionary'));
[$count] = $xoopsDB->fetchRow($sqlQuery);
Method extractKeywords
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function extractKeywords($content)
{
global $xoopsTpl, $xoTheme, $xoopsModule;
$helper = Helper::getInstance();
Method lx_extract_keywords
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_extract_keywords($content)
{
global $xoopsTpl, $xoTheme, $xoopsModule, $xoopsModuleConfig;
require_once XOOPS_ROOT_PATH . '/modules/lexikon/include/common.inc.php';
$keywords_count = $helper->getConfig('metakeywordsnum');
Function categorySave
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function categorySave($categoryID = '')
{
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
require_once XOOPS_ROOT_PATH . '/class/uploader.php';
global $xoopsUser, $xoopsConfig, $xoopsModule, $xoopsDB, $myts, $categoryID;
- 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 lx_Statistics
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_Statistics()
{
global $xoopsModule, $xoopsConfig;
$helper = Helper::getInstance();
xoops_load('XoopsUserUtility');
Method lx_search
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_search($queryarray, $andor, $limit, $offset, $userid)
{
global $xoopsDB, $xoopsUser;
// -- search comments + highlighter
$highlight = false;
File admin.php
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: Lexikon - glossary module
* Version: v 1.00
File admin.php
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: Lexikon - glossary module
* Version: v 1.00
Method lx_removeAccents
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_removeAccents($string)
{
$chars['in'] = chr(128)
. chr(131)
. chr(138)
Method b_lxentries_random_show
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_lxentries_random_show()
{
global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule;
$myts = \MyTextSanitizer::getInstance();
Method entryDefault
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
function entryDefault()
{
global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $entryID, $pathIcon16;
$helper = Helper::getInstance();
require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
Method __construct
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($target)
{
global $helper;
$this->targetObject = $target;
Method DefinitionImport
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
function DefinitionImport($delete)
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
$sqlQuery = $xoopsDB->query('SELECT count(id) AS count FROM ' . $xoopsDB->prefix('glossaire'));
[$count] = $xoopsDB->fetchRow($sqlQuery);
Function DefinitionImport
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function DefinitionImport($delete)
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
$sqlQuery = $xoopsDB->query('SELECT count(id) AS count FROM ' . $xoopsDB->prefix('glossaire'));
[$count] = $xoopsDB->fetchRow($sqlQuery);
- 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 category.php
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: Lexikon - glossary module
* Author: hsalazar
* Licence: GNU
Method b_lxspot_show
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_lxspot_show($options)
{
global $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer:: getInstance();
xoops_load('XoopsUserUtility');