Showing 216 of 316 total issues
File submissions.php
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: Lexikon - glossary module
* Author: hsalazar
* Changes: Yerres
Method b_scrolling_term_show
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_scrolling_term_show($options)
{
global $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer:: getInstance();
$utility = new Utility();
Method render
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render($alphaCount = null, $howmanyother = null)
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
\xoops_loadLanguage('common', $moduleDirName);
Function __construct
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($target)
{
global $helper;
$this->targetObject = $target;
- 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 deleteDirectory
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function deleteDirectory($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
Method getServiceLinks
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getServiceLinks($variable)
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsConfig, $entrytype;
$helper = Helper::getInstance();
Method lx_serviceLinks
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_serviceLinks($variable)
{
global $xoopsUser, $xoopsDB, $xoopsModule, $xoopsModuleConfig, $xoopsConfig, $entrytype;
/** @var \XoopsModuleHandler $moduleHandler */
Method xoops_module_update_lexikon
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_lexikon(\XoopsModule $module, $previousVersion = null)
{
$moduleDirName = \basename(\dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
Function lx_seemsUtf8
has a Cognitive Complexity of 17 (exceeds 5 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;
- 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 xoops_module_install_lexikon
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_install_lexikon(\XoopsObject $xoopsModule)
{
$module_id = $xoopsModule->getVar('mid');
/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
- 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 xoops_module_update_lexikon_v152
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_lexikon_v152($xoopsModule)
{
/**
* Create default upload directories
*/
- 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 isUtf8
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function isUtf8($Str)
{ # by bmorel at ssi dot fr
for ($i = 0, $iMax = mb_strlen($Str); $i < $iMax; ++$i) {
if (\ord($Str[$i]) < 0x80) {
continue;
- 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 isBlockCloned
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options = null)
{
xoops_loadLanguage('admin', 'system');
xoops_loadLanguage('admin/blocksadmin', 'system');
xoops_loadLanguage('admin/groups', 'system');
Method xoops_module_install_lexikon
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_install_lexikon(\XoopsObject $xoopsModule)
{
$module_id = $xoopsModule->getVar('mid');
/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
File submit.php
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: Lexikon - glossary module
* Author: hsalazar
* Licence: GNU
Method lx_importMenu
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_importMenu($currentoption = 0, $breadcrumb = '')
{
global $cf;
echo "<table style='border:0; width:99%;'>
<tr><td style='vertical-align:top;'>
Function render
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function render($alphaCount = null, $howmanyother = null)
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
\xoops_loadLanguage('common', $moduleDirName);
- 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 b_lxentries_alpha_show
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_lxentries_alpha_show($options)
{
global $xoopsDB, $xoopsUser, $xoopsModule;
$myts = \MyTextSanitizer::getInstance();
Method b_scrolling_term_edit
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_scrolling_term_edit($options)
{
global $xoopsDB;
$myts = MyTextSanitizer:: getInstance();
$form = "<table style='width:100%' class='bg2'>";
Method render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
// load all child ids for javascript codes
foreach (\array_keys($this->_itemTree) as $item_id) {
$this->_itemTree[$item_id]['allchild'] = [];