XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function addRows has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

        public function addRows($template, $rows, $prefix = '')
        {
            //  Store the vars in this array
            $newvars = array();

Severity: Minor
Found in include/patTemplate.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 phpThumbDebug has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    public function phpThumbDebug($level = '')
    {
        if ($level && ($this->phpThumbDebug !== $level)) {
            return true;
        }
Severity: Minor
Found in thumbs/phpthumb.class.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

File index.php has 288 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 index.php - About 2 hrs to fix

    Method get_xoops_search_result has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public function get_xoops_search_result($keywords, $andor, $limit, $offset, $uid)
            {
                // �����׻�
                $tzoffset = ($this->user_TZ - $this->server_TZ) * 3600;
    
    
    Severity: Major
    Found in class/APCal_xoops.php - About 2 hrs to fix

      Method setOutputFormat has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function setOutputFormat()
          {
              static $alreadyCalled = false;
              if ($this->thumbnailFormat && $alreadyCalled) {
                  return true;
      Severity: Major
      Found in thumbs/phpthumb.class.php - About 2 hrs to fix

        Method makeShort has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function makeShort($str)
        {
            $replacements = array(
                'Š' => 'S',
                'š' => 's',
        Severity: Major
        Found in include/oninstall.php - About 2 hrs to fix

          Method makeShort has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function makeShort($str)
          {
              $replacements = array(
                  'Š' => 'S',
                  'š' => 's',
          Severity: Major
          Found in include/onupdate.php - About 2 hrs to fix

            Method applyUnsharpMask has 70 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static function applyUnsharpMask(&$img, $amount, $radius, $threshold)
                {
            
                    // $img is an image that is already created within php using
                    // imgcreatetruecolor. No url! $img must be a truecolor image.
            Severity: Major
            Found in thumbs/phpthumb.unsharp.php - About 2 hrs to fix

              Function showAtElement has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

              Calendar.prototype.showAtElement = function (el, opts) {
                  var self = this;
                  var p = Calendar.getAbsolutePos(el);
                  if (!opts || typeof opts != "string") {
                      this.showAt(p.x, p.y + el.offsetHeight);
              Severity: Minor
              Found in assets/js/jscalendar/calendar.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 wrapperMouseHandler has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                      wrapperMouseHandler: function (e) {
                          try {
                              if (!e) e = window.event;
                              var over = /mouseover/i.test(e.type);
                              if (!e.target) e.target = e.srcElement; // ie
              Severity: Minor
              Found in assets/images/js/highslide/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 getOverlays has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                      getOverlays: function () {
                          this.getInline(['heading', 'caption'], true);
                          this.getNumber();
                          if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
                          if (hs.showCredits) this.writeCredits();
              Severity: Minor
              Found in assets/images/js/highslide/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 positionOverlay has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                      positionOverlay: function (overlay) {
                          var p = overlay.position || 'middle center',
                              offX = overlay.offsetX,
                              offY = overlay.offsetY;
                          if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
              Severity: Minor
              Found in assets/images/js/highslide/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 updateAnchors has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                      updateAnchors: function () {
                          var el, els, all = [], images = [], groups = {}, re;
              
                          for (var i = 0; i < hs.openerTagNames.length; i++) {
                              els = document.getElementsByTagName(hs.openerTagNames[i]);
              Severity: Minor
              Found in assets/images/js/highslide/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 updateAnchors has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                      updateAnchors: function () {
                          var el, els, all = [], images = [], groups = {}, re;
              
                          for (var i = 0; i < hs.openerTagNames.length; i++) {
                              els = document.getElementsByTagName(hs.openerTagNames[i]);
              Severity: Minor
              Found in assets/images/js/highslide/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 contentLoaded has a Cognitive Complexity of 20 (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/images/js/highslide/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 positionOverlay has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                      positionOverlay: function (overlay) {
                          var p = overlay.position || 'middle center',
                              offX = overlay.offsetX,
                              offY = overlay.offsetY;
                          if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
              Severity: Minor
              Found in assets/images/js/highslide/highslide-with-html.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 output_setsqls has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function output_setsqls()
                  {
                      $rets = array();
              
                      foreach ($this->events as $uid => $event) {
              Severity: Minor
              Found in class/iCal_parser.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 get_where_about_categories has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                      public function get_where_about_categories()
                      {
                          if ($this->isadmin) {
                              if (empty($this->now_cid)) {
                                  // �����Ԥ�����Ԥ�$cid���꤬�ʤ���о��True
              Severity: Minor
              Found in class/APCal.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 getGD_PixelPlotterVersion has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getGD_PixelPlotterVersion()
                  {
                      if (!$this->m_bLoaded) {
                          return false;
                      }
              Severity: Minor
              Found in thumbs/phpthumb.gif.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 RedirectToCachedFile has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

              function RedirectToCachedFile()
              {
                  global $phpThumb;
              
                  $nice_cachefile = str_replace(DIRECTORY_SEPARATOR, '/', $phpThumb->cache_filename);
              Severity: Minor
              Found in thumbs/phpThumb.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

              Severity
              Category
              Status
              Source
              Language