XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function dayMouseOver has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

Calendar.dayMouseOver = function (ev) {
    var el = Calendar.getElement(ev);
    if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
        return false;
    }
Severity: Minor
Found in assets/js/jscalendar/calendar.js - About 35 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 _toggleMultipleDate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

Calendar.prototype._toggleMultipleDate = function (date) {
    if (this.multiple) {
        var ds = date.print("%Y%m%d");
        var cell = this.datesCells[ds];
        if (cell) {
Severity: Minor
Found in assets/js/jscalendar/calendar.js - About 35 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 resize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        resize: function (e) {
            var w, h, r = e.width / e.height;
            w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
            if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
            h = w / r;
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 35 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 close has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        close: function () {
            if (this.isClosing || !this.isExpanded) return;
            this.isClosing = true;

            hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
Severity: Minor
Found in assets/images/js/highslide/highslide.js - About 35 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 getParam has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        getParam: function (a, param) {
            a.getParams = a.onclick;
            var p = a.getParams ? a.getParams() : null;
            a.getParams = null;

Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 35 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 resize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        resize: function (e) {
            var w, h, r = e.width / e.height;
            w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
            if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
            h = w / r;
Severity: Minor
Found in assets/images/js/highslide/highslide.js - About 35 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 htmlGetSize has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        htmlGetSize: function () {
            if (this.iframe && !this.objectHeight) { // loadtime before
                this.iframe.style.height = this.body.style.height = this.getIframePageHeight() + 'px';
            }
            this.innerContent.appendChild(hs.clearing);
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 35 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 destroyObject has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        destroyObject: function () {
            if (hs.ie && this.iframe)
                try {
                    this.iframe.contentWindow.document.body.innerHTML = '';
                } catch (e) {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 35 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 getExpander has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        getExpander: function (el, expOnly) {
            if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
            if (typeof el == 'number') return hs.expanders[el] || null;
            if (typeof el == 'string') el = hs.$(el);
            return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 35 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 getExpander has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        getExpander: function (el, expOnly) {
            if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
            if (typeof el == 'number') return hs.expanders[el] || null;
            if (typeof el == 'string') el = hs.$(el);
            return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 35 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 getExpander has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        getExpander: function (el, expOnly) {
            if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
            if (typeof el == 'number') return hs.expanders[el] || null;
            if (typeof el == 'string') el = hs.$(el);
            return hs.expanders[hs.getWrapperKey(el, expOnly)] || null;
Severity: Minor
Found in assets/images/js/highslide/highslide.js - About 35 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 getParam has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        getParam: function (a, param) {
            a.getParams = a.onclick;
            var p = a.getParams ? a.getParams() : null;
            a.getParams = null;

Severity: Minor
Found in assets/images/js/highslide/highslide.js - About 35 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 getParam has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        getParam: function (a, param) {
            a.getParams = a.onclick;
            var p = a.getParams ? a.getParams() : null;
            a.getParams = null;

Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 35 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 _renderOptionTree has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
    {
        $tree .= $prefix
                 . '<input type="checkbox" name="'
                 . $this->getName()
Severity: Minor
Found in admin/mygrouppermform.php - About 35 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 addVars has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        public function addVars($template, $variables, $prefix = '')
        {
            //  Are there variables?
            if (!is_array($variables)) {
                return false;
Severity: Minor
Found in include/patTemplate.php - About 35 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 _check has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public function _check($from_lines, $to_lines)
    {
        if (serialize($from_lines) != serialize($this->getOriginal())) {
            trigger_error("Reconstructed original doesn't match", E_USER_ERROR);
        }
Severity: Minor
Found in include/Text_Diff.php - About 35 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 admin_refcheck has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    function admin_refcheck($chkref = '')
    {
        if (empty($_SERVER['HTTP_REFERER'])) {
            return true;
        } else {
Severity: Minor
Found in include/gtickets.php - About 35 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 addVar has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        public function addVar($template, $name, $value)
        {
            $template = strtoupper($template);
            $name     = strtoupper($name);

Severity: Minor
Found in include/patTemplate.php - About 35 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 copy_templates_f2db has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

function copy_templates_f2db($tplset_to, $whr_append = '1')
{
    global $db;

    // get tplsource
Severity: Minor
Found in admin/mytplsadmin.php - About 35 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 parseAttributes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        public function parseAttributes($string)
        {
            //  Check for trailing slash, if tag was an empty XML Tag
            if (substr($string, -1) === '/') {
                $string = substr($string, 0, strlen($string) - 1);
Severity: Minor
Found in include/patTemplate.php - About 35 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