Showing 691 of 1,163 total issues
Function destroyOverlays
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
destroyOverlays: function () {
if (!this.overlays.length) return;
if (this.slideshow) {
var c = this.slideshow.controls;
if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
- 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 calcExpanded
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
calcExpanded: function () {
var exp = this.exp;
this.justify = 'auto';
// get alignment
- 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 awake
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
awake: function () {
try {
hs.expanders[this.key] = this;
- 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 init
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
init: function () {
if (!hs.container) {
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ieLt9 = hs.ie && hs.uaVersion < 9;
- 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 calcExpanded
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
calcExpanded: function () {
var exp = this.exp;
this.justify = 'auto';
// get alignment
- 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 xoops_module_update_extcal
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function xoops_module_update_extcal(\XoopsModule $xoopsModule, $previousVersion = null)
{
$helper = Helper::getInstance();
$newVersion = $helper->getModule()->getVar('version') * 100;
if ($newVersion == $previousVersion) {
- 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 getRecurRules
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function getRecurRules($parm)
{
//Utility::echoArray($parm);exit;
// If this isn't a reccuring event
- 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 htmlSizeOperations
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
htmlSizeOperations: function () {
this.setObjContainerSize(this.innerContent);
Function justify
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
justify: function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
Function justify
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
justify: function (p, moveOnly) {
var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
if (tgt && tgt.match(/ /)) {
tgtArr = tgt.split(' ');
Function keyHandler
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
keyHandler: function (e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
Method adjustDate
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function adjustDate(&$y, &$m, &$d, &$h, &$i, &$s)
{
if ($s < 0) {
$m -= floor($s / _EXTCAL_TS_MINUTE);
$s = -$s % _EXTCAL_TS_MINUTE;
Method addEventToCalArray
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addEventToCalArray(&$event, &$eventsArray, $startPeriod, $endPeriod)
{
global $timeHandler, $xoopsUser, $month, $year;
// Calculating the start and the end of the event
Method getForm
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getForm($action = false)
{
global $xoopsDB;
if (false === $action) {
Method render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$addBaliseTable = $this->_addBaliseTable;
$title = $this->getTitle();
$ret = '';
Function keyHandler
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
keyHandler: function (e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement; // ie
if (typeof e.target.form != 'undefined') return true; // form element has focus
var exp = hs.getExpander();
Function init
has 45 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 xoops_module_update_extcal
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function xoops_module_update_extcal(\XoopsModule $xoopsModule, $previousVersion = null)
{
$helper = Helper::getInstance();
$newVersion = $helper->getModule()->getVar('version') * 100;
if ($newVersion == $previousVersion) {
Method create
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function create($type, $y = 2000, $m = 1, $d = 1, $h = 0, $i = 0, $s = 0)
{
$firstDay = defined('CALENDAR_FIRST_DAY_OF_WEEK') ? CALENDAR_FIRST_DAY_OF_WEEK : 1;
switch ($type) {
case 'Day':
Function run
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
run: function () {
var xhr;
if (!this.src) this.src = hs.getSrc(this.a);
if (this.src.match('#')) {
var arr = this.src.split('#');