mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function custom has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

        custom: function (from, to, unit) {
            this.startTime = (new Date()).getTime();
            this.start = from;
            this.end = to;
            this.unit = unit;// || this.unit || "px";
Severity: Minor
Found in assets/js/highslide-full.js - About 2 hrs 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 custom has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

        custom: function (from, to, unit) {
            this.startTime = (new Date()).getTime();
            this.start = from;
            this.end = to;
            this.unit = unit;// || this.unit || "px";
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 2 hrs 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 custom has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

        custom: function (from, to, unit) {
            this.startTime = (new Date()).getTime();
            this.start = from;
            this.end = to;
            this.unit = unit;// || this.unit || "px";
Severity: Minor
Found in assets/js/highslide.js - About 2 hrs 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 adjustDate has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    public function adjustDate(&$y, &$m, &$d, &$h, &$i, &$s)
    {
        if ($s < 0) {
            $m -= floor($s / _EXTCAL_TS_MINUTE);
            $s = -$s % _EXTCAL_TS_MINUTE;
Severity: Minor
Found in class/pear/Calendar/Engine/PearDate.php - About 2 hrs 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 updateBlock has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    function updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups)
    {
        $moduleDirName      = \basename(\dirname(__DIR__));
        $moduleDirNameUpper = \mb_strtoupper($moduleDirName);

Severity: Minor
Found in admin/blocksadmin.php - About 2 hrs 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 PclTarAddList has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarAddList($p_tarname, $p_filelist, $p_add_dir = '', $p_remove_dir = '', $p_mode = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarAddList', "tar=$p_tarname, file=$p_filelist, p_add_dir='$p_add_dir', p_remove_dir='$p_remove_dir', mode=$p_mode");
        $v_result      = 1;
        $p_list_detail = [];
Severity: Minor
Found in class/pcltar.lib.php - About 2 hrs 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 getEventsUniques has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    public function getEventsUniques($criteres)
    {
        $cat = 0;
        //        while (list($k, $v) = each($criteres)) {
        foreach ($criteres as $k => $v) {
Severity: Minor
Found in class/EventHandler.php - About 2 hrs 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 PclTarHandlerDirCheck has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarHandlerDirCheck($p_dir)
    {
        $v_result = 1;

        TrFctStart(__FILE__, __LINE__, 'PclTarHandlerDirCheck', (string)$p_dir);
Severity: Minor
Found in class/pcltar.lib.php - About 2 hrs 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 render has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function render()
    {
        $sSpinFolder = $this->getFolder();
        $sFolderImg  = "{$sSpinFolder}/images/{$this->getImgFolder()}/";

Severity: Major
Found in class/Form/Spin/FormSpin.php - About 2 hrs to fix

    Method getRecurRules has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getRecurRules($parm)
        {
            //Utility::echoArray($parm);exit;
    
            // If this isn't a reccuring event
    Severity: Major
    Found in class/EventHandler.php - About 2 hrs to fix

      Function mouseClickHandler has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              mouseClickHandler: function (e) {
                  if (!e) e = window.event;
                  if (e.button > 1) return true;
                  if (!e.target) e.target = e.srcElement;
      
      
      Severity: Major
      Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

        Function mouseClickHandler has 51 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                mouseClickHandler: function (e) {
                    if (!e) e = window.event;
                    if (e.button > 1) return true;
                    if (!e.target) e.target = e.srcElement;
        
        
        Severity: Major
        Found in assets/js/highslide.js - About 2 hrs to fix

          Method getEventsRecurents has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getEventsRecurents($criteres)
              {
                  //        while (list($k, $v) = each($criteres)) {
                  foreach ($criteres as $k => $v) {
                      ${$k} = $v;
          Severity: Major
          Found in class/EventHandler.php - About 2 hrs to fix

            Function changeSize has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    changeSize: function (up, to, dur) {
            
                        if (this.outline && !this.outlineWhileAnimating) {
                            if (up) this.outline.setPosition();
                            else this.outline.destroy();
            Severity: Minor
            Found in assets/js/highslide.js - About 2 hrs to fix

              Method loadImg has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function loadImg($REQUEST, &$event_picture1, &$event_picture2)
                  {
                      ///////////////////////////////////////////////////////////////////////////////
                      $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/';
                      $uploadurl_event = XOOPS_URL . '/uploads/extcal/';
              Severity: Minor
              Found in class/Utility.php - About 1 hr to fix

                Method extcal_getDefautminicalOption has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function extcal_getDefautminicalOption(&$options)
                {
                    // 0|0|150|225|1|3|10|0|1|1,2|| |120|120
                    for ($h = 0; $h <= 13; ++$h) {
                        if (!isset($options[$h])) {
                Severity: Minor
                Found in blocks/minical.php - About 1 hr to fix

                  Method PclTarHandleExtractByIndexList has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function PclTarHandleExtractByIndexList(
                          $p_tarname,
                          $p_index_string,
                          &$p_list_detail,
                          $p_path,
                  Severity: Minor
                  Found in class/pcltar.lib.php - About 1 hr to fix

                    Function awake has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                            awake: function () {
                                try {
                    
                                    hs.expanders[this.key] = this;
                    
                    
                    Severity: Minor
                    Found in assets/js/highslide-full.js - About 1 hr 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 destroyOverlays has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                            destroyOverlays: function () {
                                if (!this.overlays.length) return;
                                if (this.slideshow) {
                                    var c = this.slideshow.controls;
                                    if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                    Severity: Minor
                    Found in assets/js/highslide-full.js - About 1 hr 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 init has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                    Open

                            init: function () {
                                if (!hs.container) {
                    
                                    hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                                    hs.ieLt9 = hs.ie && hs.uaVersion < 9;
                    Severity: Minor
                    Found in assets/js/highslide-full.js - About 1 hr 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