mambax7/extcal

View on GitHub

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;
            }
Severity: Minor
Found in assets/js/highslide.js - About 55 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 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];
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 55 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 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;
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 55 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 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;
            }
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 55 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 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
                }, {
Severity: Minor
Found in assets/js/highslide.js - About 55 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 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 = [];
Severity: Minor
Found in class/pcltar.lib.php - About 55 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 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)) {
Severity: Minor
Found in class/Common/FilesManagement.php - About 55 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 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;
Severity: Minor
Found in class/Common/FilesManagement.php - About 55 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 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;

Severity: Minor
Found in class/pcltar.lib.php - About 55 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 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;
Severity: Minor
Found in class/Common/FilesManagement.php - About 55 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 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;

Severity: Minor
Found in class/pcltar.lib.php - About 55 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 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);
Severity: Minor
Found in class/CategoryHandler.php - About 55 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 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'];
Severity: Minor
Found in class/Utility.php - About 55 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 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]) {
Severity: Minor
Found in class/Time.php - About 55 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

Method isBlockCloned has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function isBlockCloned($bid, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options)
Severity: Major
Found in admin/blocksadmin.php - About 50 mins to fix

    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')
    Severity: Major
    Found in include/agenda_fnc.php - About 50 mins to fix

      Method PclTarHandleExtract has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $p_tarname,
              $p_file_list,
              &$p_list_detail,
              $p_mode,
              $p_path,
      Severity: Major
      Found in class/pcltar.lib.php - About 50 mins to fix

        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)
        Severity: Major
        Found in class/pear/Calendar/Factory.php - About 50 mins to fix

          Method getSearchEvent2 has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function getSearchEvent2($year, $month, $day, $cat, $searchExp, $andor, $orderBy)
          Severity: Major
          Found in class/EventHandler.php - About 50 mins to fix

            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
            Severity: Major
            Found in assets/js/highslide-full.js - About 45 mins to fix
              Severity
              Category
              Status
              Source
              Language