XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function mouseClickHandler has a Cognitive Complexity of 44 (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/images/js/highslide/highslide.js - About 6 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 mouseClickHandler has a Cognitive Complexity of 44 (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/images/js/highslide/highslide-with-gallery.js - About 6 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 createParser has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
Open

        public function createParser($fname)
        {
            //  Store filename of the first file that has to be opened
            //  If basedir is set, prepend basedir
            $pname = $this->basedir !== '' ? $this->basedir . '/' . $fname : $fname;
Severity: Minor
Found in include/patTemplate.php - About 6 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 changeSize has a Cognitive Complexity of 43 (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/images/js/highslide/highslide-with-gallery.js - About 6 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 showHideElements has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

        showHideElements: function (tagName, visibility) {
            var els = document.getElementsByTagName(tagName);
            var prop = tagName == '*' ? 'overflow' : 'visibility';
            for (var i = 0; i < els.length; i++) {
                if (prop == 'visibility' || (document.defaultView.getComputedStyle(
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 6 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 showHideElements has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

        showHideElements: function (tagName, visibility) {
            var els = document.getElementsByTagName(tagName);
            var prop = tagName == '*' ? 'overflow' : 'visibility';
            for (var i = 0; i < els.length; i++) {
                if (prop == 'visibility' || (document.defaultView.getComputedStyle(
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 6 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 _shiftBoundaries has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public function _shiftBoundaries($lines, &$changed, $other_changed)
    {
        $i = 0;
        $j = 0;

Severity: Minor
Found in include/Text_Diff.php - About 6 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_calendar_information has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

        public function get_calendar_information($mode = 'M')
        {
            $ret = array();

            // ���ܾ���
Severity: Minor
Found in class/APCal.php - About 6 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 ResolveFilenameToAbsolute has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public function ResolveFilenameToAbsolute($filename)
    {
        if (empty($filename)) {
            return false;
        }
Severity: Minor
Found in thumbs/phpthumb.class.php - About 6 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

PatTemplate has 46 functions (exceeds 20 allowed). Consider refactoring.
Open

    class PatTemplate
    {
        /**
         * Constructor
         *
Severity: Minor
Found in include/patTemplate.php - About 6 hrs to fix

    prototype has 46 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: Minor
    Found in assets/images/js/highslide/highslide-with-html.js - About 6 hrs to fix

      Function DropShadow has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
      Open

          public function DropShadow(&$gdimg, $distance, $width, $hexcolor, $angle, $alpha)
          {
              if (phpthumb_functions::gd_version() < 2) {
                  return false;
              }
      Severity: Minor
      Found in thumbs/phpthumb.filters.php - About 6 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 CleanUpCacheDirectory has 154 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function CleanUpCacheDirectory()
          {
              $this->DebugMessage('CleanUpCacheDirectory() set to purge ('
                                  . (is_null($this->config_cache_maxage) ? 'NULL' : number_format($this->config_cache_maxage / 86400, 1))
                                  . ' days; '
      Severity: Major
      Found in thumbs/phpthumb.class.php - About 6 hrs to fix

        Method xoops_module_update_apcal has 150 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function xoops_module_update_apcal(XoopsModule $module)
        {
            //    global $xoopsDB;
            $moduleDirName = basename(dirname(__DIR__));
            $capsDirName   = strtoupper($moduleDirName);
        Severity: Major
        Found in include/onupdate.php - About 6 hrs to fix

          hs has 44 functions (exceeds 20 allowed). Consider refactoring.
          Open

              var hs = {
          // Language strings
                  lang: {
                      cssDirection: 'ltr',
                      loadingText: 'Loading...',
          Severity: Minor
          Found in assets/images/js/highslide/highslide-with-html.js - About 6 hrs to fix

            phpthumb_functions has 44 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class phpthumb_functions
            {
            
                /**
                 * @param $functionname
            Severity: Minor
            Found in thumbs/phpthumb.functions.php - About 6 hrs to fix

              Method ExtractEXIFgetImageSize has 149 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function ExtractEXIFgetImageSize()
                  {
                      $this->DebugMessage('starting ExtractEXIFgetImageSize()', __FILE__, __LINE__);
              
                      if (preg_match('#^http:#i', $this->src) && !$this->sourceFilename && $this->rawImageData) {
              Severity: Major
              Found in thumbs/phpthumb.class.php - About 5 hrs to fix

                Function check has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                Open

                        public function check($post = true, $area = '')
                        {
                            global $xoopsModule;
                
                            $this->_errors = array();
                Severity: Minor
                Found in include/gtickets.php - About 5 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 ImprovedImageRotate has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static function ImprovedImageRotate(
                        &$gdimg_source,
                        $rotate_angle = 0,
                        $config_background_hexcolor = 'FFFFFF',
                        $bg = null,
                Severity: Minor
                Found in thumbs/phpthumb.filters.php - About 5 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 get_daily_html has 143 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public function get_daily_html($get_target = '')
                        {
                            $roimage = XOOPS_URL . '/modules/apcal/assets/images/regonline/regonline.png'; // added by goffy: image for online registration
                            // get the result of plugins
                            $plugin_returns = array();
                Severity: Major
                Found in class/APCal.php - About 5 hrs to fix
                  Severity
                  Category
                  Status
                  Source
                  Language