mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

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

    public function getListCriteriaCompo($start, $end, $cat = 0, $user = null)
    {
        $criteriaCompo = $this->getCriteriaCompo($start, $end, $cat, $user);
        if (!Helper::getInstance()->getConfig('diplay_past_event_list')) {
            $criteriaCompo->add(new \Criteria('event_end', \time(), '>'));
Severity: Minor
Found in class/EventHandler.php and 1 other location - About 45 mins to fix
class/EventHandler.php on lines 674..682

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 95.

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 3 locations. Consider refactoring.
Open

                if (!this[type] && s) this[type] = hs.createElement('div',
                    {className: 'highslide-' + type, innerHTML: s});
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 2469..2470
assets/js/highslide-with-gallery.js on lines 1964..1965

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 49.

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 3 locations. Consider refactoring.
Open

            var exp = this,
                l = this.x.get('loadingPos') + 'px',
                t = this.y.get('loadingPos') + 'px';
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 40 mins to fix
assets/js/highslide-with-gallery.js on lines 1285..1287
assets/js/highslide.js on lines 1096..1098

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 49.

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 3 locations. Consider refactoring.
Open

    hs.addEventListener(document, 'mousemove', function (e) {
        hs.mouse = {x: e.clientX, y: e.clientY};
    });
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 3396..3398
assets/js/highslide-with-gallery.js on lines 2690..2692

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 49.

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 3 locations. Consider refactoring.
Open

                if (!this[type] && s) this[type] = hs.createElement('div',
                    {className: 'highslide-' + type, innerHTML: s});
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 40 mins to fix
assets/js/highslide-with-gallery.js on lines 1964..1965
assets/js/highslide.js on lines 1469..1470

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 49.

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 3 locations. Consider refactoring.
Open

            var exp = this,
                l = this.x.get('loadingPos') + 'px',
                t = this.y.get('loadingPos') + 'px';
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 1485..1487
assets/js/highslide.js on lines 1096..1098

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 49.

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 3 locations. Consider refactoring.
Open

                if (!this[type + 'Id'] && this.thumbsUserSetId)
                    this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 2443..2444
assets/js/highslide.js on lines 1444..1445

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 49.

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 3 locations. Consider refactoring.
Open

    hs.addEventListener(document, 'mousemove', function (e) {
        hs.mouse = {x: e.clientX, y: e.clientY};
    });
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 40 mins to fix
assets/js/highslide-with-gallery.js on lines 2690..2692
assets/js/highslide.js on lines 1913..1915

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 49.

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 3 locations. Consider refactoring.
Open

                if (!this[type + 'Id'] && this.thumbsUserSetId)
                    this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 2443..2444
assets/js/highslide-with-gallery.js on lines 1938..1939

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 49.

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 3 locations. Consider refactoring.
Open

    hs.addEventListener(document, 'mousemove', function (e) {
        hs.mouse = {x: e.clientX, y: e.clientY};
    });
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 3396..3398
assets/js/highslide.js on lines 1913..1915

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 49.

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 3 locations. Consider refactoring.
Open

            var exp = this,
                l = this.x.get('loadingPos') + 'px',
                t = this.y.get('loadingPos') + 'px';
Severity: Major
Found in assets/js/highslide.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 1485..1487
assets/js/highslide-with-gallery.js on lines 1285..1287

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 49.

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 3 locations. Consider refactoring.
Open

                if (!this[type + 'Id'] && this.thumbsUserSetId)
                    this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
Severity: Major
Found in assets/js/highslide-full.js and 2 other locations - About 40 mins to fix
assets/js/highslide-with-gallery.js on lines 1938..1939
assets/js/highslide.js on lines 1444..1445

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 49.

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 3 locations. Consider refactoring.
Open

                if (!this[type] && s) this[type] = hs.createElement('div',
                    {className: 'highslide-' + type, innerHTML: s});
Severity: Major
Found in assets/js/highslide-with-gallery.js and 2 other locations - About 40 mins to fix
assets/js/highslide-full.js on lines 2469..2470
assets/js/highslide.js on lines 1469..1470

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 49.

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

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    public function thisWeek($format = 'n_in_month')
    {
        if (method_exists($this->calendar, 'thisWeek')) {
            return $this->calendar->thisWeek($format);
        }
Severity: Major
Found in class/pear/Calendar/Decorator.php and 2 other locations - About 40 mins to fix
class/pear/Calendar/Decorator.php on lines 400..409
class/pear/Calendar/Decorator.php on lines 436..445

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 94.

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

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    public function nextWeek($format = 'n_in_month')
    {
        if (method_exists($this->calendar, 'nextWeek')) {
            return $this->calendar->nextWeek($format);
        }
Severity: Major
Found in class/pear/Calendar/Decorator.php and 2 other locations - About 40 mins to fix
class/pear/Calendar/Decorator.php on lines 400..409
class/pear/Calendar/Decorator.php on lines 418..427

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 94.

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

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    public function prevWeek($format = 'n_in_month')
    {
        if (method_exists($this->calendar, 'prevWeek')) {
            return $this->calendar->prevWeek($format);
        }
Severity: Major
Found in class/pear/Calendar/Decorator.php and 2 other locations - About 40 mins to fix
class/pear/Calendar/Decorator.php on lines 418..427
class/pear/Calendar/Decorator.php on lines 436..445

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 94.

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

Consider simplifying this complex logical expression.
Open

                if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                    || (sg && sg === this.slideshowGroup)) {
                    this.createOverlay(o);
                }
Severity: Major
Found in assets/js/highslide-with-gallery.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                    if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                        || (sg && sg === this.slideshowGroup)) {
                        if (this.isImage || (this.isHtml && o.useOnHtml))
                            this.createOverlay(o);
                    }
    Severity: Major
    Found in assets/js/highslide-full.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

                      if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
                          || (sg && sg === this.slideshowGroup)) {
                          this.createOverlay(o);
                      }
      Severity: Major
      Found in assets/js/highslide.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                        if (($stamp1 >= $event['start'] && $stamp1 < $event['end'])
                            || ($stamp2 >= $event['start']
                                && $stamp2 < $event['end'])
                            || ($stamp1 <= $event['start'] && $stamp2 > $event['end'])) {
                            $this->children[$i]->addEntry($event);
        Severity: Major
        Found in class/pear/Calendar/docs/examples/20.php - About 40 mins to fix
          Severity
          Category
          Status
          Source
          Language