mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

Function getPosition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        getPosition: function (el) {
            var p = {x: el.offsetLeft, y: el.offsetTop};
            while (el.offsetParent) {
                el = el.offsetParent;
                p.x += el.offsetLeft;
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 25 mins to fix

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 doShowHide has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        doShowHide: function (visibility) {
            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
            if (hs.geckoMac) this.showHideElements('*', visibility);
        },
Severity: Minor
Found in assets/js/highslide-full.js - About 25 mins to fix

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 expand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        expand: function (a, params, custom, type) {
            if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
            if (typeof a.getParams == 'function') return params;
            try {
                new hs.Expander(a, params, custom);
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 25 mins to fix

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 doShowHide has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        doShowHide: function (visibility) {
            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
            if (hs.geckoMac) this.showHideElements('*', visibility);
        },
Severity: Minor
Found in assets/js/highslide.js - About 25 mins to fix

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 afterClose has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        afterClose: function () {
            this.a.className = this.a.className.replace('highslide-active-anchor', '');

            this.doShowHide('visible');
            if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 25 mins to fix

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 Dimension has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    hs.Dimension = function (exp, dim) {
        this.exp = exp;
        this.dim = dim;
        this.ucwh = dim == 'x' ? 'Width' : 'Height';
        this.wh = this.ucwh.toLowerCase();
Severity: Minor
Found in assets/js/highslide.js - About 25 mins to fix

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 Dimension has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    hs.Dimension = function (exp, dim) {
        this.exp = exp;
        this.dim = dim;
        this.ucwh = dim == 'x' ? 'Width' : 'Height';
        this.wh = this.ucwh.toLowerCase();
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 25 mins to fix

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 getPosition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        getPosition: function (el) {
            var p = {x: el.offsetLeft, y: el.offsetTop};
            while (el.offsetParent) {
                el = el.offsetParent;
                p.x += el.offsetLeft;
Severity: Minor
Found in assets/js/highslide.js - About 25 mins to fix

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 expand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        expand: function (a, params, custom, type) {
            if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
            if (typeof a.getParams == 'function') return params;
            try {
                new hs.Expander(a, params, custom);
Severity: Minor
Found in assets/js/highslide.js - About 25 mins to fix

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 afterExpand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        afterExpand: function () {
            this.isExpanded = true;
            this.focus();
            if (this.dimmingOpacity) hs.dim(this);
            if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 25 mins to fix

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 doShowHide has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

        doShowHide: function (visibility) {
            if (hs.hideSelects) this.showHideElements('SELECT', visibility);
            if (hs.hideIframes) this.showHideElements('IFRAME', visibility);
            if (hs.geckoMac) this.showHideElements('*', visibility);
        },
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 25 mins to fix

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 setFragments has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function setFragments($y, $m = null, $d = null, $h = null, $i = null, $s = null)
    {
        if (null !== $y) {
            $this->uris['Year'] = $y;
        }
Severity: Minor
Found in class/pear/Calendar/Util/Uri.php - About 25 mins to fix

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 getEngine has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function &getEngine()
    {
        static $engine = false;
        switch (CALENDAR_ENGINE) {
            case 'PearDate':
Severity: Minor
Found in class/pear/Calendar/Calendar.php - About 25 mins to fix

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 bExtcalDayEdit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function bExtcalDayEdit($options)
{
    global $xoopsUser;

    //    $categoryHandler = xoops_getModuleHandler(_EXTCAL_CLS_CAT, _EXTCAL_MODULE);
Severity: Minor
Found in blocks/day_events.php - About 25 mins to fix

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_install_extcal has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function xoops_module_install_extcal(\XoopsModule $xoopsModule)
{
    require_once \dirname(__DIR__) . '/preloads/autoloader.php';

    $moduleDirName = \basename(\dirname(__DIR__));
Severity: Minor
Found in include/oninstall.php - About 25 mins to fix

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 loadSampleData has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function loadSampleData()
{
    global $xoopsConfig;
    $moduleDirName      = \basename(\dirname(__DIR__));
    $moduleDirNameUpper = mb_strtoupper($moduleDirName);
Severity: Minor
Found in testdata/index.php - About 25 mins to fix

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 bExtcalUpcomingByCategoryEdit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function bExtcalUpcomingByCategoryEdit($options)
{
    global $xoopsUser;

    $helper          = Helper::getInstance();
Severity: Minor
Found in blocks/category_events.php - About 25 mins to fix

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 bExtcalNewEdit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function bExtcalNewEdit($options)
{
    global $xoopsUser;

    $helper = Helper::getInstance();
Severity: Minor
Found in blocks/new_events.php - About 25 mins to fix

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 setSelection has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public function setSelection($sDates)
    {
        foreach ($sDates as $sDate) {
            if ($this->year == $sDate->thisYear()) {
                $key = $sDate->thisMonth();
Severity: Minor
Found in class/pear/Calendar/Year.php - About 25 mins to fix

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 bExtcalRandomEdit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function bExtcalRandomEdit($options)
{
    global $xoopsUser;

    $helper = Helper::getInstance();
Severity: Minor
Found in blocks/random_events.php - About 25 mins to fix

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

Severity
Category
Status
Source
Language