Showing 216 of 316 total issues
Method getAuthorProfile
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getAuthorProfile($uid)
{
require_once XOOPS_ROOT_PATH . '/class/pagenav.php';
global $authortermstotal, $xoopsTpl, $xoopsDB, $xoopsUser;
Method convertHtml2text
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function convertHtml2text($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 b_lxspot_edit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function b_lxspot_edit($options)
{
global $xoopsDB;
$myts = MyTextSanitizer:: getInstance();
$resultcat = $xoopsDB->query('SELECT categoryID, name FROM ' . $xoopsDB->prefix('lxcategories') . ' ORDER BY categoryID');
Method myblocksadmin_update_blockinstance
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function myblocksadmin_update_blockinstance(
$id,
$bside,
$bweight,
$bvisible,
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;
}
Function lx_getLinkedUnameFromId
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function lx_getLinkedUnameFromId($userid = 0, $name = 0)
{
if (!is_numeric($userid)) {
return $userid;
}
- 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 entryDefault
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function entryDefault()
{
global $xoopsUser, $xoopsConfig, $xoopsDB, $xoopsModule, $entryID, $pathIcon16;
$helper = Helper::getInstance();
require_once XOOPS_ROOT_PATH . '/class/xoopslists.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 getLinkedUnameFromId
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function getLinkedUnameFromId($userid = 0, $name = 0)
{
if (!\is_numeric($userid)) {
return $userid;
}
- 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 xcopy
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function xcopy($source, $dest)
{
// Check for symlinks
if (\is_link($source)) {
return \symlink(\readlink($source), $dest);
- 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 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 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 lexikon_block_getAuthors
has 35 lines of code (exceeds 25 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';
Method lexikon_notify_iteminfo
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function lexikon_notify_iteminfo($category, $item_id)
{
/*global $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
if (empty($xoopsModule) || $xoopsModule->getVar('dirname') != 'lexikon') {
Method xoops_module_install_lexikon
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_install_lexikon(\XoopsModule $module)
{
$moduleDirName = \basename(\dirname(__DIR__));
$helper = Helper::getInstance();
Method getAlphaArray
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function getAlphaArray()
{
global $xoopsUser, $xoopsDB, $xoopsModule;
$grouppermHandler = \xoops_getHandler('groupperm');
$groups = \is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
Method render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$ret = '';
if (\count($this->_appendix) > 0) {
Method getBlockAuthors
has 35 lines of code (exceeds 25 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';
Method myblocksadmin_update_blockinstance
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
$id,
$bside,
$bweight,
$bvisible,
$btitle,
Function positiontip
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function positiontip(e) {
if (enabletip) {
var nondefaultpos = false;
var curX = (ns6) ? e.pageX : event.clientX + ietruebody().scrollLeft;
var curY = (ns6) ? e.pageY : event.clientY + ietruebody().scrollTop;