Showing 691 of 1,163 total issues
Function wrapperMouseHandler
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
wrapperMouseHandler: function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement; // ie
- 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 extcal_getDefautminicalOption
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function extcal_getDefautminicalOption(&$options)
{
// 0|0|150|225|1|3|10|0|1|1,2|| |120|120
for ($h = 0; $h <= 13; ++$h) {
if (!isset($options[$h])) {
- 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 deleteDirectory
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function deleteDirectory($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 PclTarHandleReadHeader
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandleReadHeader($v_binary_data, &$v_header)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
$v_result = 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
Function contentLoaded
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
contentLoaded: function () {
try {
if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
Method getSearchEvent3
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSearchEvent3(
$queryarray,
$andor,
$limit,
$offset,
Function mouseClickHandler
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
mouseClickHandler: function (e) {
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
Function changeSize
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
changeSize: function (up, to, dur) {
// transition
var trans = this.transitions,
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
t = (trans[1] && other
Method agenda_getCanevas
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function agenda_getCanevas($ts, $hStart, $hEnd, $mPlage = 15, $nbJours = 1, $formatDate = '', $formatJour = 'H:i')
{
$helper = Helper::getInstance();
$jour = date('d', $ts);
$mois = date('m', $ts);
Function init
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function () {
if (!hs.container) {
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ieLt9 = hs.ie && hs.uaVersion < 9;
File pcltrace.lib.php
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// --------------------------------------------------------------------------------
// PhpConcept Library (PCL) Trace 1.0
// --------------------------------------------------------------------------------
// License GNU/GPL - Vincent Blavet - Janvier 2001
Function DetectFlashVer
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) {
versionStr = GetSwfVer();
if (versionStr == -1) {
return false;
} else if (versionStr != 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 getSearchEvent3
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getSearchEvent3(
$queryarray,
$andor,
$limit,
$offset,
- 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 positionOverlay
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
positionOverlay: function (overlay) {
var p = overlay.position || 'middle center',
offX = overlay.offsetX,
offY = overlay.offsetY;
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
Method isBlockCloned
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
{
xoops_loadLanguage('admin', 'system');
xoops_loadLanguage('admin/blocksadmin', 'system');
xoops_loadLanguage('admin/groups', 'system');
Method getEventsUniques
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getEventsUniques($criteres)
{
$cat = 0;
// while (list($k, $v) = each($criteres)) {
foreach ($criteres as $k => $v) {
Function init
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function () {
if (!hs.container) {
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ieLt9 = hs.ie && hs.uaVersion < 9;
Method objectToArray
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function objectToArray($objects, $externalKeys = [], $format = 's')
{
static $cache;
if (!\is_array($externalKeys)) {
$externalKeys = [$externalKeys];
File Utility.php
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace XoopsModules\Extcal;
/**
Function custom
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
custom: function (from, to, unit) {
this.startTime = (new Date()).getTime();
this.start = from;
this.end = to;
this.unit = unit;// || this.unit || "px";
- 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"