Showing 374 of 649 total issues
Function getRefByName
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getRefByName(l, d) {
var r = null, j
d = (d || document)
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups): void
{
\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 editfaq
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function editfaq($showmenu = false, $faqid = -1): void
{
global $faqHandler, $categoryHandler, $xoopsUser, $xoopsConfig, $xoopsDB, $modify, $xoopsModule, $XOOPS_URL, $myts;
/** @var Smartfaq\Helper $helper */
$helper = Smartfaq\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 sf_displayTarea
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function &sf_displayTarea(&$text, $html = 0, $smiley = 1, $xcode = 1, $image = 1, $br = 1)
{
global $myts;
if (1 != $html) {
- 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 = ''): void
{
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
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
Method getCategoriesWithOpenQuestion
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function &getCategoriesWithOpenQuestion(
$limit = 0,
$start = 0,
$parentid = 0,
$sort = 'weight',
Function getAnchorLocation
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getAnchorLocation(objRef) {
var mkObj, of, offsets, mlyr
mkObj = mlyr = objRef
offsets = [o3_anchorx, o3_anchory]
if (document.layers) {
Function getAnchorLocation
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getAnchorLocation(objRef) {
var mkObj, of, offsets, mlyr
mkObj = mlyr = objRef
offsets = [o3_anchorx, o3_anchory]
Method cloneBlock
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function cloneBlock(int $bid)
: void {
//require __DIR__ . '/admin_header.php';
// \xoops_cp_header();
Method render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$ret = '';
if (\count($this->_appendix) > 0) {
Method editBlock
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function editBlock(int $bid)
: void {
// require_once \dirname(__DIR__,2) . '/admin/admin_header.php';
// \xoops_cp_header();
\xoops_loadLanguage('admin', 'system');
Method smartfaq_notify_iteminfo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function smartfaq_notify_iteminfo($category, $item_id)
{
global $xoopsModule, $xoopsModuleConfig, $xoopsConfig;
if (empty($xoopsModule) || 'smartfaq' !== $xoopsModule->getVar('dirname')) {
Function parseAnchorExtras
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function parseAnchorExtras(pf, i, ar) {
var v, k = i;
if (k < ar.length) {
if (ar[k] == ANCHOR) {
eval(pf + "anchor='" + escSglQuote(ar[++k]) + "'");
- 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
Function parseAnchorExtras
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function parseAnchorExtras(pf, i, ar) {
var v, k = i;
if (k < ar.length) {
if (ar[k] == ANCHOR) {
- 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,
Function getObjects
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function &getObjects(CriteriaElement $criteria = null, $id_as_key = false, $as_object = true)
{
$ret = [];
$limit = $start = 0;
$sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_answers');
- 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 sendNotifications
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function sendNotifications($notifications = []): void
{
$smartModule = Smartfaq\Utility::getModuleInfo();
$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 getObjects
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getObjects($criteria = null, $id_as_key = false)
{
$ret = [];
$limit = $start = 0;
$sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_categories');
- 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"