Showing 201 of 201 total issues
Method createThumb
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createThumb(
$img_width = null,
$img_height = null,
$img_quality = null,
$img_update = null,
Method makeMySelBox
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = '')
{
if ('' === $sel_name) {
$sel_name = $this->id;
}
Method b_sitemap_wflinks
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_sitemap_wflinks()
{
global $sitemap_configs;
global $xoopsDB, $xoopsUser, $xoopsModule;
$myts = \MyTextSanitizer::getInstance();
Function getDirListAsArray
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getDirListAsArray($dirname)
{
$dirlist = [];
if (\is_dir($dirname) && $handle = \opendir($dirname)) {
while (false !== ($file = \readdir($handle))) {
- 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 render
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$ret = '';
if (count($this->_appendix) > 0) {
- 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 render
has a Cognitive Complexity of 12 (exceeds 5 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'] = [];
- 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 makeMySelBox
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = '')
{
if ('' === $sel_name) {
$sel_name = $this->id;
}
- 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 wflinks_tag_iteminfo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wflinks_tag_iteminfo(&$items)
{
$moduleDirName = basename(dirname(__DIR__));
if (empty($items) || !is_array($items)) {
Method render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$ret = '';
if (count($this->_appendix) > 0) {
Method b_wflinks_top_show
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_wflinks_top_show($options)
{
$moduleDirName = basename(dirname(__DIR__));
global $xoopsDB;
Method convertOrderByOut
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function convertOrderByOut($orderby)
{
if ('title ASC' === $orderby) {
$orderby = 'titleA';
}
Consider simplifying this complex logical expression. Open
if (0 == $published['offline']
&& ($published['published'] && $published['published'] < \time())
&& (($published['expired'] && $published['expired'] > \time()) || 0 == $published['expired'])) {
$published_status = $imageArray['online'];
} elseif (0 == $published['offline'] && ($published['expired'] && $published['expired'] < \time())) {
Method xoops_module_install_wflinks
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_install_wflinks(\XoopsModule $module)
{
require_once dirname(__DIR__, 3) . '/mainfile.php';
// require_once dirname(__DIR__) . '/class/Utility.php';
Method convertOrderByIn
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function convertOrderByIn($orderby)
{
switch (\trim($orderby)) {
case 'titleA':
$orderby = 'title ASC';
Method vcard_quoted_printable_encode
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function vcard_quoted_printable_encode($input, $line_max = 76)
{
$hex = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'];
$lines = \preg_split("/(?:\r\n|\r|\n)/", $input);
$eol = "\r\n";
Method wflinks_search
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wflinks_search($queryarray, $andor, $limit, $offset, $userid)
{
global $xoopsDB, $xoopsUser;
$sql = 'SELECT cid, pid FROM ' . $xoopsDB->prefix('wflinks_cat');
Function convertOrderByIn
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function convertOrderByIn($orderby)
{
switch (\trim($orderby)) {
case 'titleA':
$orderby = 'title ASC';
- 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 createCat
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function createCat($cid = 0)
{
// require_once dirname(__DIR__) . '/class/wfllists.php';
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.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
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
Method myblocksadmin_update_block
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
$bid,
$bside,
$bweight,
$bvisible,
$btitle,