Showing 155 of 201 total issues
Method createCat
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createCat($cid = 0)
{
// require_once dirname(__DIR__) . '/class/wfllists.php';
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
Function displayIcons
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public static function displayIcons($time, $status = 0, $counter = 0)
{
global $xoopsModule;
/** @var Wflinks\Helper $helper */
$helper = Wflinks\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
File blocksadmin.inc.php
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* 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
* which is considered copyrighted (c) material of the original comment or credit authors.
Function getWysiwygForm
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public static function getWysiwygForm($caption, $name, $value)
{
global $xoopsUser, $xoopsModule;
/** @var Wflinks\Helper $helper */
$helper = Wflinks\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 getSubstring
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public static function getSubstring($str, $start, $length, $trimmarker = '...')
{
$configHandler = \xoops_getHandler('config');
$im_multilanguageConfig = $configHandler->getConfigsByCat(IM_CONF_MULILANGUAGE);
- 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 updateBlock
has a Cognitive Complexity of 30 (exceeds 5 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);
- 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 getWysiwygForm
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getWysiwygForm($caption, $name, $value)
{
global $xoopsUser, $xoopsModule;
/** @var Wflinks\Helper $helper */
$helper = Wflinks\Helper::getInstance();
File category.php
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: WF-Links
* Version: v1.0.3
* Release Date: 21 June 2005
Function myblocksadmin_update_block
has a Cognitive Complexity of 28 (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
File submit.php
has 327 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Module: WF-Links
* Version: v1.0.3
* Release Date: 21 June 2005
File myblocksadmin.php
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// ------------------------------------------------------------------------- //
// myblocksadmin.php //
// - XOOPS block admin for each modules - //
// GIJOE <http://www.peak.ne.jp> //
Method resizeImage
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function resizeImage()
{
/** @var Wflinks\Helper $helper */
$helper = Wflinks\Helper::getInstance();
Function checkVerModule
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static function checkVerModule($helper, $source = 'github', $default = 'master')
{
$moduleDirName = \basename(dirname(__DIR__, 2));
$moduleDirNameUpper = mb_strtoupper($moduleDirName);
$update = '';
- 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 resizeImage
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function resizeImage()
{
/** @var Wflinks\Helper $helper */
$helper = Wflinks\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 isBlockCloned
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
{
xoops_loadLanguage('admin', 'system');
xoops_loadLanguage('admin/blocksadmin', 'system');
xoops_loadLanguage('admin/groups', 'system');
- 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 getListTypeAsArray
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public static function getListTypeAsArray($dirname, $type = '', $prefix = '', $noselection = 1)
{
$filelist = [];
switch (\trim($type)) {
case 'images':
- 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 edit
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function edit($lid = 0)
{
global $xoopsDB, $myts, $mytree, $imageArray, $xoopsConfig, $xoopsModule, $xoopsUser;
/** @var Helper $helper */
$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
Method getTotalItems
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getTotalItems($sel_id = 0, $get_child = 0, $return_sql = 0)
{
global $xoopsDB, $mytree, $_check_array;
if ($sel_id > 0) {
Method truncateHtml
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
{
if ($considerHtml) {
// if the plain text is shorter than the maximum length, return the whole text
if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
Method myblocksadmin_update_block
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
function myblocksadmin_update_block(
$bid,
$bside,
$bweight,
$bvisible,