Showing 374 of 649 total issues
File overlib_anchor_mini.js
has 308 lines of code (exceeds 250 allowed). Consider refactoring. Open
//\/////
//\ overLIB Anchor Plugin
//\ This file requires overLIB 4.00 or later.
//\
//\ overLIB 4.05 - You may not remove or change this notice.
File myblocksadmin.php
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/**
* Module: SmartFAQ
* Author: The SmartFactory <www.smartfactory.ca>
Method insert
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function insert(\XoopsObject $object, $force = false)
{
if ('xoopsmodules\smartfaq\faq' !== \mb_strtolower(\get_class($object))) {
return false;
}
Function ol_content_caption
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function ol_content_caption(text, title, close) {
var nameId;
closing = "";
closeevent = "onmouseover";
if (o3_closeclick == 1) closeevent = (o3_closetitle ? "title='" + o3_closetitle + "'" : "") + " onclick";
- 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 ol_content_caption
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function ol_content_caption(text, title, close) {
var nameId;
closing = "";
closeevent = "onmouseover";
if (o3_closeclick == 1) closeevent = (o3_closetitle ? "title='" + o3_closetitle + "'" : "") + " onclick";
- 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_attachmentImage
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function sf_attachmentImage($source)
{
/** @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
Method displayAttachment
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function displayAttachment($asSource = false)
{
global $xoopsModule;
/** @var Smartfaq\Helper $helper */
$helper = Smartfaq\Helper::getInstance();
File modinfo.php
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php declare(strict_types=1);
/**
* Module: SmartFAQ
* Author: The SmartFactory <www.smartfactory.ca>
Function overlib
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function overlib() {
if (!olLoaded || isExclusive(overlib.arguments)) return true;
if (olCheckMouseCapture) olMouseCapture();
if (over) cClick();
Function placeLayer
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function placeLayer() {
var placeX, placeY, widthFix = 0;
// HORIZONTAL PLACEMENT
if (eval('o3_frame.' + docRoot) && eval("typeof o3_frame." + docRoot + ".clientWidth=='number'") && eval('o3_frame.' + docRoot + '.clientWidth')) {
Function overlib
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function overlib() {
if (!olLoaded || isExclusive(overlib.arguments)) return true;
if (olCheckMouseCapture) olMouseCapture();
if (over) cClick();
o3_text = ol_text;
Function placeLayer
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
function placeLayer() {
var placeX, placeY, widthFix = 0;
if (eval('o3_frame.' + docRoot) && eval("typeof o3_frame." + docRoot + ".clientWidth=='number'") && eval('o3_frame.' + docRoot + '.clientWidth')) {
iwidth = eval('o3_frame.' + docRoot + '.clientWidth');
} else if (typeof(o3_frame.innerWidth) == 'number') {
Method editcat
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editcat($showmenu = false, $categoryid = 0): void
{
//$moderators = []; // just to define the variable
//$allmods = [];
$startfaq = Request::getInt('startfaq', 0, 'GET');
Function getAnchorOffsets
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getAnchorOffsets(mkObj) {
var fx = fy = 0, mp, puc, mkAry, sx = sy = 0, w = o3_anchoralign
var mW = mH = pW = pH = 0
var off = [0, 0]
Function getAnchorOffsets
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getAnchorOffsets(mkObj) {
var fx = fy = 0, mp, puc, mkAry, sx = sy = 0, w = o3_anchoralign
var mW = mH = pW = pH = 0
var off = [0, 0]
mkAry = w.split(',');
Function hideSelectBox
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function hideSelectBox() {
if (olNs4 || olOp || olIe55) return;
var px, py, pw, ph, sx, sw, sy, sh, selEl, v;
if (olIe4) v = 0; else {
v = navigator.userAgent.match(/Gecko\/(\d{8})/i);
- 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 wrapStr
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function wrapStr(endWrap, fontSizeStr, whichString) {
var fontStr, fontColor, isClose = ((whichString == 'close') ? 1 : 0), hasDims = /[%\-a-z]+$/.test(fontSizeStr);
fontSizeStr = (olNs4) ? (!hasDims ? fontSizeStr : '1') : fontSizeStr;
if (endWrap) return (hasDims && !olNs4) ? (isClose ? '</span>' : '</div>') : '</font>'; else {
fontStr = 'o3_' + whichString + 'font';
- 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 wrapStr
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function wrapStr(endWrap, fontSizeStr, whichString) {
var fontStr, fontColor, isClose = ((whichString == 'close') ? 1 : 0), hasDims = /[%\-a-z]+$/.test(fontSizeStr);
fontSizeStr = (olNs4) ? (!hasDims ? fontSizeStr : '1') : fontSizeStr;
if (endWrap) return (hasDims && !olNs4) ? (isClose ? '</span>' : '</div>') : '</font>';
else {
- 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 21 (exceeds 5 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);
- 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 hideSelectBox
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function hideSelectBox() {
if (olNs4 || olOp || olIe55) return;
var px, py, pw, ph, sx, sw, sy, sh, selEl, v;
if (olIe4) v = 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"