mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function contentLoaded has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
Open

        contentLoaded: function () {
            try {
                if (!this.content) return;
                this.content.onload = null;
                if (this.onLoadStarted) return;
Severity: Minor
Found in assets/js/highslide-full.js - About 1 day 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 getInline has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
Open

        getInline: function (types, addOverlay) {
            for (var i = 0; i < types.length; i++) {
                var type = types[i], s = null;
                if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
                else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
Severity: Minor
Found in assets/js/highslide-full.js - About 1 day 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 getInline has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
Open

        getInline: function (types, addOverlay) {
            for (var i = 0; i < types.length; i++) {
                var type = types[i], s = null;
                if (!this[type + 'Id'] && this.thumbsUserSetId)
                    this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 1 day 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 contentLoaded has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
Open

        contentLoaded: function () {
            try {
                if (!this.content) return;
                this.content.onload = null;
                if (this.onLoadStarted) return;
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 1 day 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 PclTarHandleExtract has 237 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function PclTarHandleExtract(
        $p_tarname,
        $p_file_list,
        &$p_list_detail,
        $p_mode,
Severity: Major
Found in class/pcltar.lib.php - About 1 day to fix

    Function getInline has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

            getInline: function (types, addOverlay) {
                for (var i = 0; i < types.length; i++) {
                    var type = types[i], s = null;
                    if (!this[type + 'Id'] && this.thumbsUserSetId)
                        this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
    Severity: Minor
    Found in assets/js/highslide.js - About 1 day 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 changeSize has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
    Open

            changeSize: function (up, to, dur) {
                // transition
                var trans = this.transitions,
                    other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                    t = (trans[1] && other
    Severity: Minor
    Found in assets/js/highslide-full.js - About 1 day 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 justify has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
    Open

            justify: function (p, moveOnly) {
                var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
    
                if (tgt && tgt.match(/ /)) {
                    tgtArr = tgt.split(' ');
    Severity: Minor
    Found in assets/js/highslide-with-gallery.js - About 1 day 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 mouseClickHandler has a Cognitive Complexity of 58 (exceeds 5 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: Minor
    Found in assets/js/highslide-full.js - About 1 day 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 justify has a Cognitive Complexity of 58 (exceeds 5 allowed). Consider refactoring.
    Open

            justify: function (p, moveOnly) {
                var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
    
                if (tgt && tgt.match(/ /)) {
                    tgtArr = tgt.split(' ');
    Severity: Minor
    Found in assets/js/highslide-full.js - About 1 day 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 listBlocks has 212 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function listBlocks()
        {
            global $xoopsModule, $pathIcon16;
            require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
            $moduleDirName      = \basename(\dirname(__DIR__));
    Severity: Major
    Found in admin/blocksadmin.php - About 1 day to fix

      Function truncateHtml has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
          {
              if ($considerHtml) {
                  // if the plain text is shorter than the maximum length, return the whole text
                  if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
      Severity: Minor
      Found in class/Common/SysUtility.php - About 1 day 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 PclTarHandleAddFile has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
      Open

          function PclTarHandleAddFile($p_tar, $p_filename, $p_mode, &$p_header, $p_add_dir, $p_remove_dir)
          {
              TrFctStart(__FILE__, __LINE__, 'PclTarHandleAddFile', "tar='$p_tar', filename='$p_filename', p_mode='$p_mode', add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
              $v_result = 1;
      
      
      Severity: Minor
      Found in class/pcltar.lib.php - About 1 day 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 PclTarHandleUpdate has 201 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function PclTarHandleUpdate($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode, $p_add_dir, $p_remove_dir)
          {
              TrFctStart(__FILE__, __LINE__, 'PclTarHandleUpdate', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
              $v_result     = 1;
              $v_nb         = 0;
      Severity: Major
      Found in class/pcltar.lib.php - About 1 day to fix

        Function Expander has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
        Open

            hs.Expander = function (a, params, custom, contentType) {
                if (document.readyState && hs.ie && !hs.isReady) {
                    hs.addEventListener(document, 'ready', function () {
                        new hs.Expander(a, params, custom, contentType);
                    });
        Severity: Minor
        Found in assets/js/highslide-full.js - About 7 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 xoops_module_update_extcal has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

        function xoops_module_update_extcal(\XoopsModule $module, $previousVersion = null)
        {
            //    global $xoopsDB;
            $moduleDirName = \basename(\dirname(__DIR__));
        
        
        Severity: Minor
        Found in include/onupdate.php - About 7 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 PclTarHandleExtractByIndex has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

            function PclTarHandleExtractByIndex(
                $p_tar,
                &$p_index_current,
                $p_index_start,
                $p_index_stop,
        Severity: Minor
        Found in class/pcltar.lib.php - About 7 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

        File blocksadmin.php has 480 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * You may not change or alter any portion of this comment or credits
         * of supporting developers from this source code or any supporting source code
         * which is considered copyrighted (c) material of the original comment or credit authors.
        Severity: Minor
        Found in admin/blocksadmin.php - About 7 hrs to fix

          prototype has 53 functions (exceeds 20 allowed). Consider refactoring.
          Open

              hs.Expander.prototype = {
                  error: function (e) {
                      if (hs.debug) alert('Line ' + e.lineNumber + ': ' + e.message);
                      else window.location.href = this.src;
                  },
          Severity: Major
          Found in assets/js/highslide-full.js - About 7 hrs to fix

            File ExtcalPersistableObjectHandler.php has 473 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            namespace XoopsModules\Extcal;
            
            /*
            Severity: Minor
            Found in class/ExtcalPersistableObjectHandler.php - About 7 hrs to fix
              Severity
              Category
              Status
              Source
              Language