Showing 216 of 316 total issues
Method setPermissions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setPermissions($myArray, $permissionGroup, $categoryID, $grouppermHandler, $permissionName, $mid)
{
$permissionArray = $myArray;
if ($categoryID > 0) {
$sql = 'DELETE FROM `' . $GLOBALS['xoopsDB']->prefix('group_permission') . "` WHERE `gperm_name` = '" . $permissionName . "' AND `gperm_itemid`= $categoryID;";
Function lx_getmoduleoption
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function lx_getmoduleoption($option, $repmodule = 'lexikon')
{
global $xoopsModuleConfig, $xoopsModule;
static $tbloptions = [];
if (is_array($tbloptions) && array_key_exists($option, $tbloptions)) {
- 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 lexikon_block_getAuthors
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function lexikon_block_getAuthors($limit = 5, $sort = 'count', $name = 'uname', $compute_method = 'average')
{
$limit = (int)$limit;
if ('uname' !== $name) {
$name = 'name';
- 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_blockinstance
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function myblocksadmin_update_blockinstance(
$id,
$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
Function lx_create_pagetitle
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function lx_create_pagetitle($article = '', $topic = '')
{
global $xoopsModule, $xoopsTpl;
$myts = \MyTextSanitizer::getInstance();
$content = '';
- 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 lx_Statistics
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function lx_Statistics()
{
global $xoopsModule, $xoopsConfig;
$helper = Helper::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
Method myblocksadmin_update_block
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
$bid,
$bside,
$bweight,
$bvisible,
$btitle,
Function getBlockAuthors
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getBlockAuthors($limit = 5, $sort = 'count', $name = 'uname', $compute_method = 'average')
{
$limit = (int)$limit;
if ('uname' !== $name) {
$name = 'name';
- 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 getModuleOption
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function getModuleOption($option, $repmodule = 'lexikon')
{
global $xoopsModuleConfig, $xoopsModule;
static $tbloptions = [];
if (\is_array($tbloptions) && \array_key_exists($option, $tbloptions)) {
- 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 rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function rrmdir($src)
{
// Only continue if user is a 'global' Admin
if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
return false;
- 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 createPageTitle
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function createPageTitle($article = '', $topic = '')
{
global $xoopsModule, $xoopsTpl;
$myts = \MyTextSanitizer::getInstance();
$content = '';
- 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 categoryDelete
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function categoryDelete($categoryID = '')
{
//global $xoopsDB, $xoopsConfig;
global $xoopsConfig, $xoopsDB, $xoopsModule;
$idc = Request::getInt('categoryID', '');
Method lx_html2text
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_html2text($document)
{
// PHP Manual:: function preg_replace $document should contain an HTML document.
// This will remove HTML tags, javascript sections and white space. It will also
// convert some common HTML entities to their text equivalent.
Method lexikon_tag_iteminfo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lexikon_tag_iteminfo(&$items)
{
if (empty($items) || !is_array($items)) {
return false;
}
Method lexikon_tag_iteminfo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lexikon_tag_iteminfo(&$items)
{
if (empty($items) || !is_array($items)) {
return false;
}
Method b_lxcategories_show
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_lxcategories_show($options)
{
global $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer:: getInstance();
Method lx_seemsUtf8
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_seemsUtf8($Str)
{ # by bmorel at ssi dot fr
for ($i = 0, $iMax = mb_strlen($Str); $i < $iMax; ++$i) {
if (ord($Str[$i]) < 0x80) {
continue;
Method lexikon_summary
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lexikon_summary()
{
global $xoopsDB;
$summary = [];
Method loadTableFromArrayWithReplace
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace)
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
Method getSummary
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getSummary()
{
global $xoopsDB;
$summary = [];