mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

Method _makeXMLSlideshowConf has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function _makeXMLSlideshowConf($options)
{
    // create a  new \XML document
    $doc               = new DomDocument('1.0');
    $doc->formatOutput = true;
Severity: Minor
Found in blocks/minical.php - About 1 hr to fix

    Function createOverlay has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            createOverlay: function (o) {
                var el = o.overlayId;
                if (typeof el == 'string') el = hs.getNode(el);
                if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                if (!el || typeof el == 'string') return;
    Severity: Minor
    Found in assets/js/highslide.js - About 1 hr to fix

      Method __construct has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function __construct($form, $startTS = 0, $endTS = 0)
          {
              $startTS       = (int)$startTS;
              $startTS       = ($startTS > 0) ? $startTS : \time();
              $startDatetime = \getdate($startTS);
      Severity: Minor
      Found in class/Form/FormDateTime.php - About 1 hr to fix

        Method getSearchEvents has 11 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                $year = 0,
                $month = 0,
                $day = 0,
                $cat = 0,
                $queryarray = null,
        Severity: Major
        Found in class/EventHandler.php - About 1 hr to fix

          Method TrFctStart has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function TrFctStart($p_file, $p_line, $p_name, $p_param = '', $p_message = '')
              {
                  global $g_pcl_trace_level;
                  global $g_pcl_trace_mode;
                  global $g_pcl_trace_filename;
          Severity: Minor
          Found in class/pcltrace.lib.php - About 1 hr to fix

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

                    if (document.readyState && hs.ie && !hs.isReady) {
                        hs.addEventListener(document, 'ready', function () {
                            new hs.Expander(a, params, custom, contentType);
                        });
                        return;
            Severity: Major
            Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
            assets/js/highslide-full.js on lines 1362..1367
            assets/js/highslide-with-gallery.js on lines 1168..1173

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

            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 (document.readyState && hs.ie && !hs.isReady) {
                        hs.addEventListener(document, 'ready', function () {
                            new hs.Expander(a, params, custom, contentType);
                        });
                        return;
            Severity: Major
            Found in assets/js/highslide-full.js and 2 other locations - About 1 hr to fix
            assets/js/highslide-with-gallery.js on lines 1168..1173
            assets/js/highslide.js on lines 983..988

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

            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 (document.readyState && hs.ie && !hs.isReady) {
                        hs.addEventListener(document, 'ready', function () {
                            new hs.Expander(a, params, custom, contentType);
                        });
                        return;
            Severity: Major
            Found in assets/js/highslide-with-gallery.js and 2 other locations - About 1 hr to fix
            assets/js/highslide-full.js on lines 1362..1367
            assets/js/highslide.js on lines 983..988

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

            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 (!hs.container) {
            
                            hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                            hs.ieLt9 = hs.ie && hs.uaVersion < 9;
            
            
            Severity: Critical
            Found in assets/js/highslide-with-gallery.js - About 1 hr to fix

              Function dragHandler has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      dragHandler: function (e) {
                          if (!hs.dragArgs) return true;
                          if (!e) e = window.event;
                          var a = hs.dragArgs, exp = a.exp;
                          if (exp.iframe) {
              Severity: Minor
              Found in assets/js/highslide-full.js - About 1 hr to fix

                Method bExtcalUpcomingByCategoryShow has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function bExtcalUpcomingByCategoryShow($options)
                {
                    global $xoopsUser;
                
                    /** @var Helper $helper */
                Severity: Minor
                Found in blocks/category_events.php - About 1 hr to fix

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

                              if (this.fadeInOut) {
                                  hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                  hs.extend(to.wrapper, {opacity: up});
                              }
                  Severity: Major
                  Found in assets/js/highslide-with-gallery.js and 2 other locations - About 1 hr to fix
                  assets/js/highslide-full.js on lines 2069..2072
                  assets/js/highslide.js on lines 1345..1348

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

                  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.fadeInOut) {
                                  hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                  hs.extend(to.wrapper, {opacity: up});
                              }
                  Severity: Major
                  Found in assets/js/highslide.js and 2 other locations - About 1 hr to fix
                  assets/js/highslide-full.js on lines 2069..2072
                  assets/js/highslide-with-gallery.js on lines 1593..1596

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

                  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.fadeInOut) {
                                  hs.setStyles(this.wrapper, {opacity: up ? 0 : 1});
                                  hs.extend(to.wrapper, {opacity: up});
                              }
                  Severity: Major
                  Found in assets/js/highslide-full.js and 2 other locations - About 1 hr to fix
                  assets/js/highslide-with-gallery.js on lines 1593..1596
                  assets/js/highslide.js on lines 1345..1348

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

                  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

                              if (this.slideshow) {
                                  var c = this.slideshow.controls;
                                  if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                              }
                  Severity: Major
                  Found in assets/js/highslide-full.js and 1 other location - About 1 hr to fix
                  assets/js/highslide-with-gallery.js on lines 2326..2329

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

                  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

                              if (this.slideshow) {
                                  var c = this.slideshow.controls;
                                  if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                              }
                  Severity: Major
                  Found in assets/js/highslide-with-gallery.js and 1 other location - About 1 hr to fix
                  assets/js/highslide-full.js on lines 2911..2914

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

                  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

                  Method updateBlock has 32 lines of code (exceeds 25 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 1 hr to fix

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

                                if (1 != ($v_result = PclTarHandleReadHeader($v_binary_data, $v_header))) {
                                    // ----- Close the archive file
                                    if ('tar' === $p_tar_mode) {
                                        fclose($v_tar);
                                        fclose($v_temp_tar);
                    Severity: Major
                    Found in class/pcltar.lib.php and 1 other location - About 1 hr to fix
                    class/pcltar.lib.php on lines 3105..3120

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

                    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

                                if (1 != ($v_result = PclTarHandleReadHeader($v_binary_data, $v_header))) {
                                    // ----- Close the archive file
                                    if ('tar' === $p_tar_mode) {
                                        fclose($v_tar);
                                        fclose($v_temp_tar);
                    Severity: Major
                    Found in class/pcltar.lib.php and 1 other location - About 1 hr to fix
                    class/pcltar.lib.php on lines 2832..2847

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

                    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 transit has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                    Open

                            transit: function (adj, exp) {
                                var last = exp || hs.getExpander();
                                exp = last;
                                if (hs.upcoming) return false;
                                else hs.last = last;
                    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