Showing 216 of 316 total issues
Function b_scrolling_term_show
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function b_scrolling_term_show($options)
{
global $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer:: getInstance();
$utility = new Utility();
- 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 showTooltip
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showTooltip(e, tooltipTxt) {
var bodyWidth = Math.max(document.body.clientWidth, document.documentElement.clientWidth) - 20;
if (!dhtmlgoodies_tooltip) {
Method updateBlock
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups)
{
$myblock = new \XoopsBlock($bid);
$myblock->setVar('title', $btitle);
$myblock->setVar('weight', $bweight);
Method printPage
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function printPage($entryID)
{
global $xoopsConfig, $xoopsDB, $xoopsModule, $myts;
$helper = Helper::getInstance();
Method xoops_module_update_lexikon_v152
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_lexikon_v152($xoopsModule)
{
/**
* Create default upload directories
*/
Method getWysiwygForm
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getWysiwygForm($caption, $name, $value = '', $width = '100%', $height = '400px', $supplemental = '')
{
$editor_option = mb_strtolower(static::getModuleOption('form_options'));
$editor = false;
$editor_configs = [];
Function b_lxentries_random_show
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function b_lxentries_random_show()
{
global $xoopsDB, $xoopsUser, $xoopsConfig, $xoopsModule;
$myts = \MyTextSanitizer::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 lx_close_tags
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function lx_close_tags($string)
{
// match opened tags
if (preg_match_all('/<([a-z\:\-]+)[^\/]>/', $string, $start_tags)) {
$start_tags = $start_tags[1];
- 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 closeTags
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function closeTags($string)
{
// match opened tags
if (\preg_match_all('/<([a-z\:\-]+)[^\/]>/', $string, $start_tags)) {
$start_tags = $start_tags[1];
- 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 getModuleHeader
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getModuleHeader()
{
global $xoopsTpl, $xoTheme, $xoopsModule, $lexikon_module_header;
$helper = Helper::getInstance();
Method checkVerModule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function checkVerModule($helper, $source = 'github', $default = 'master')
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
$update = '';
Method lx_module_header
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_module_header()
{
global $xoopsTpl, $xoTheme, $xoopsModule, $xoopsModuleConfig, $lexikon_module_header;
if (isset($xoTheme) && is_object($xoTheme)) {
$xoTheme->addStylesheet('modules/lexikon/assets/css/style.css');
Method cloneBlock
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cloneBlock($bid)
{
xoops_cp_header();
Function loadTableFromArrayWithReplace
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace)
{
/** @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 categoryEdit
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function categoryEdit($categoryID = '')
{
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
require_once XOOPS_ROOT_PATH . '/class/uploader.php';
require_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
- 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_collapsableBar
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lx_collapsableBar($tablename = '', $iconname = '')
{
?>
<script type="text/javascript"><!--
function goto_URL(object) {
Method editBlock
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editBlock($bid)
{
xoops_cp_header();
/** @var \Xmf\Module\Admin $adminObject */
$adminObject = Admin::getInstance();
Method lx_getWysiwygForm
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function &lx_getWysiwygForm($caption, $name, $value = '', $width = '100%', $height = '400px', $supplemental = '')
{
$editor_option = mb_strtolower(lx_getmoduleoption('form_options'));
$editor = false;
$editor_configs = [];
Method b_lxentries_top_show
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_lxentries_top_show($options)
{
global $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer:: getInstance();
Method b_lxentries_new_show
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_lxentries_new_show($options)
{
global $xoopsDB, $xoopsUser;
$myts = MyTextSanitizer:: getInstance();