Showing 691 of 1,163 total issues
Function rrmdir
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
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 modifierCouleur
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$colorHexa,
$incrementRouge,
$incrementVert,
$incrementBleu,
$plancherRouge = 0,
Function sizeOverlayBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sizeOverlayBox: function (doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles(overlayBox, {
Function close
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
close: function () {
if (this.isClosing || !this.isExpanded) return;
if (this.transitions[1] == 'crossfade' && hs.upcoming) {
hs.getExpander(hs.upcoming).cancelLoading();
hs.upcoming = null;
Function Outline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
Function sizeOverlayBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sizeOverlayBox: function (doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles(overlayBox, {
Function Outline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
Function GetSwfVer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function GetSwfVer() {
// NS/Opera version >= 3 check for Flash plugin in plugin array
var flashVer = -1;
if (navigator.plugins != null && navigator.plugins.length > 0) {
Function sizeOverlayBox
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sizeOverlayBox: function (doWrapper, doPanels) {
var overlayBox = this.overlayBox,
x = this.x,
y = this.y;
hs.setStyles(overlayBox, {
Function Outline
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
hs.Outline = function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.uaVersion, tr;
Method bExtcalUpcomingEdit
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bExtcalUpcomingEdit($options)
{
global $xoopsUser;
/** @var Helper $helper */
Function justify
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
justify: function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
var hasMovedMin = false;
Method loadTableFromArrayWithReplace
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function loadTableFromArrayWithReplace($table, $data, $search, $replace)
{
/** @var \XoopsMySQLDatabase $db */
$db = \XoopsDatabaseFactory::getDatabaseConnection();
Method __construct
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct($values)
{
if (isset($values['rrule_freq'])) {
$this->_rrule_freq = $values['rrule_freq'];
}
Method xoops_module_install_extcal
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function xoops_module_install_extcal(\XoopsModule $xoopsModule)
{
require_once \dirname(__DIR__) . '/preloads/autoloader.php';
$moduleDirName = \basename(\dirname(__DIR__));
Method PclTarDelete
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
$v_result = 1;
Method PclTarExtractList
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PclTarExtractList($p_tarname, $p_filelist, $p_path = './', $p_remove_path = '', $p_mode = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarExtractList', "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
$v_result = 1;
Method PclTarUpdate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
$v_result = 1;
Method convertResultSet
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function convertResultSet($result, $idAsKey = false, $asObject = true)
{
$ret = [];
while (false !== ($myrow = $this->db->fetchArray($result))) {
$obj = $this->create(false);
Function writeExtendedContent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
writeExtendedContent: function () {
if (this.hasExtendedContent) return;
var exp = this;
this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (this.objectType == 'iframe') {