XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 28 and the first side effect is on line 289.
Open

<?php
Severity: Minor
Found in include/gtickets.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 26 and the first side effect is on line 53.
Open

<?php
Severity: Minor
Found in locales/usa.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 49 and the first side effect is on line 22.
Open

<?php
Severity: Minor
Found in include/search.inc.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 38 and the first side effect is on line 21.
Open

<?php
Severity: Minor
Found in include/waiting.plugin.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 23 and the first side effect is on line 27.
Open

<?php

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 23 and the first side effect is on line 27.
Open

<?php
Severity: Minor
Found in blocks/apcal_minical_ex.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 23 and the first side effect is on line 27.
Open

<?php

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 81 and the first side effect is on line 22.
Open

<?php
Severity: Minor
Found in shareCalendar.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 23 and the first side effect is on line 26.
Open

<?php
Severity: Minor
Found in class/APCal.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 23 and the first side effect is on line 18.
Open

<?php
Severity: Minor
Found in class/adminMenu.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 76 and the first side effect is on line 21.
Open

<?php
Severity: Minor
Found in getevents.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 240 and the first side effect is on line 13.
Open

<?php
Severity: Minor
Found in thumbs/phpThumb.config.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 30 and the first side effect is on line 13.
Open

<?php
Severity: Minor
Found in thumbs/phpThumb.php by phpcodesniffer

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 22 and the first side effect is on line 12.
Open

<?php
Severity: Minor
Found in thumbs/phpthumb.class.php by phpcodesniffer

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            hs.setStyles(this.wrapper, {
                position: 'static',
                padding: '0 ' + hs.marginRight + 'px 0 ' + hs.marginLeft + 'px'
            });
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 50 mins to fix
assets/images/js/highslide/highslide-with-html.js on lines 1333..1336

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

            hs.setStyles(this.wrapper, {
                position: 'static',
                padding: '0 ' + hs.marginRight + 'px 0 ' + hs.marginLeft + 'px'
            });
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 50 mins to fix
assets/images/js/highslide/highslide-full.js on lines 1550..1553

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function getEvents has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function getEvents() {
    getParams();
    addCSS();

    var xmlhttp = null;
Severity: Minor
Found in assets/api/APscript.js - About 45 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 createElement has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        createElement: function (tag, attribs, styles, parent, nopad) {
            var el = document.createElement(tag);
            if (attribs) hs.extend(el, attribs);
            if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
            if (styles) hs.setStyles(el, styles);
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 45 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 setObjContainerSize has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        setObjContainerSize: function (parent, auto) {
            var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
            if (/(iframe|swf)/.test(this.objectType)) {
                if (this.objectWidth) c.style.width = this.objectWidth + 'px';
                if (this.objectHeight) c.style.height = this.objectHeight + 'px';
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 45 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 addEventListener has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

        addEventListener: function (el, event, func) {
            if (el == document && event == 'ready') {
                hs.push(hs.onReady, func);
            }
            try {
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 45 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