Showing 374 of 649 total issues
Function olMain
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function olMain() {
var layerhtml, styleType;
runHook("olMain", FBEFORE);
if (o3_background != "" || o3_fullhtml) {
Method xoops_module_update_smartfaq
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_smartfaq($module)
{
/*
// Load SmartDbUpdater from the SmartObject Framework if present
$smartdbupdater = XOOPS_ROOT_PATH . '/modules/smartobject/class/smartdbupdater.php';
Function olMain
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function olMain() {
var layerhtml, styleType;
runHook("olMain", FBEFORE);
if (o3_background != "" || o3_fullhtml) {
layerhtml = runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);
Method checkVerModule
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function checkVerModule(Helper $helper, ?string $source = 'github', ?string $default = 'master'): ?array
{
$moduleDirName = \basename(\dirname(__DIR__, 2));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
$update = '';
Method updateBlock
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateBlock(int $bid, string $btitle, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups)
: void {
$myblock = new \XoopsBlock($bid);
$myblock->setVar('title', $btitle);
$myblock->setVar('weight', $bweight);
Method insert
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insert(\XoopsObject $object, $force = false)
{
if ('xoopsmodules\smartfaq\category' !== \mb_strtolower(\get_class($object))) {
return false;
}
Method getFaqsCount
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getFaqsCount($categoryid = -1, $status = '', $notNullFields = '')
{
global $xoopsUser;
// if ( ($categoryid = -1) && (empty($status) || ($status == -1)) ) {
Method collapsableBar
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function collapsableBar($tablename = '', $iconname = ''): void
{
?>
<script type="text/javascript"><!--
function goto_URL(object) {
Method getObjects
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getObjects(\CriteriaElement $criteria = null, $id_as_key = false, $notNullFields = '')
{
$ret = [];
$limit = $start = 0;
$sql = 'SELECT * FROM ' . $this->db->prefix('smartfaq_faq');
Function getRefById
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function getRefById(l, d) {
var r = "", j
d = (d || document)
if (d.all) return d.all[l]
else if (d.getElementById) return d.getElementById(l)
- 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 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 getRefById
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function getRefById(l, d) {
var r = "", j
d = (d || document)
if (d.all) return d.all[l]
- 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 getFaqsCount
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getFaqsCount($categoryid = -1, $status = '', $notNullFields = '')
{
global $xoopsUser;
// if ( ($categoryid = -1) && (empty($status) || ($status == -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 displayCategory
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function displayCategory($categoryObj, $level = 0): void
{
global $xoopsModule, $categoryHandler, $pathIcon16;
$description = $categoryObj->description();
if (!XOOPS_USE_MULTIBYTES) {
Method orderBlock
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function orderBlock(
array $bid,
array $oldtitle,
array $oldside,
array $oldweight,
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 = ''): void
{
if ('' === $sel_name) {
$sel_name = $this->id;
}
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)
if (d.images[l]) return d.images[l]
else if (d.anchors[l]) return d.anchors[l]; else if (d.layers && d.layers.length > 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 getAnchorLocation
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getAnchorLocation(objRef) {
var mkObj, of, offsets, mlyr
mkObj = mlyr = objRef
offsets = [o3_anchorx, o3_anchory]
if (document.layers) {
- 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 getAnchorLocation
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getAnchorLocation(objRef) {
var mkObj, of, offsets, mlyr
mkObj = mlyr = objRef
offsets = [o3_anchorx, o3_anchory]
- 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 b_faqs_recent_show
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function b_faqs_recent_show($options)
{
// require_once XOOPS_ROOT_PATH . '/modules/smartfaq/include/functions.php';
$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"