Showing 691 of 1,163 total issues
Function getAnchorIndex
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getAnchorIndex: function () {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return 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 getAdjacentAnchor
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getAdjacentAnchor: function (op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length - 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 imageCreate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
imageCreate: function () {
var exp = this;
var img = document.createElement('img');
this.content = img;
- 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 getAnchorIndex
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
getAnchorIndex: function () {
var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
if (arr) for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return 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 genOverlayBox
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
genOverlayBox: function () {
if (!this.overlayBox) this.overlayBox = hs.createElement(
'div', {
className: this.wrapperClassName
}, {
- 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 PclTarAdd
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function PclTarAdd($p_tarname, $p_filelist)
{
TrFctStart(__FILE__, __LINE__, 'PclTarAdd', "tar=$p_tarname, file=$p_filelist");
$v_result = 1;
$v_list_detail = [];
- 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 recurseCopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function recurseCopy($src, $dst)
{
$dir = \opendir($src);
// @mkdir($dst);
if (!@\mkdir($dst) && !\is_dir($dst)) {
- 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 rmove
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rmove($src, $dest)
{
// 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 PclTarExtract
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function PclTarExtract($p_tarname, $p_path = './', $p_remove_path = '', $p_mode = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarExtract', "tar='$p_tarname', path='$p_path', remove_path='$p_remove_path', mode='$p_mode'");
$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 rcopy
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function rcopy($src, $dest)
{
// 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 PclTarList
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function PclTarList($p_tarname, $p_mode = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarList', "tar=$p_tarname, mode='$p_mode'");
$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 createCategory
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function createCategory($data)
{
$cat = $this->create();
$cat->setVars($data);
$this->insert($cat);
- 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 addDate2
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static function addDate2($date, $number, $interval = 'd')
{
$date_time_array = \getdate($date);
$hours = $date_time_array['hours'];
$minutes = $date_time_array['minutes'];
- 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 getFormatedReccurRule
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function getFormatedReccurRule($event_recur_rules)
{
$eventOptions = \explode('|', $event_recur_rules);
switch ($eventOptions[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
Method isBlockCloned
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
Method agenda_getCanevas
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function agenda_getCanevas($ts, $hStart, $hEnd, $mPlage = 15, $nbJours = 1, $formatDate = '', $formatJour = 'H:i')
Method PclTarHandleExtract
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
$p_tarname,
$p_file_list,
&$p_list_detail,
$p_mode,
$p_path,
Method create
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function create($type, $y = 2000, $m = 1, $d = 1, $h = 0, $i = 0, $s = 0)
Method getSearchEvent2
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getSearchEvent2($year, $month, $day, $cat, $searchExp, $andor, $orderBy)
Avoid deeply nested control flow statements. Open
} else if (visibility == 'hidden') { // hide if behind
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
if (!this.dimmingOpacity) { // hide all if dimming