XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Method dump has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function dump()
        {
            echo "<style type=\"text/css\">\n";
            echo ".text      {font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000}\n";
            echo ".mid       {font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #000000}\n";
Severity: Major
Found in include/patTemplate.php - About 5 hrs to fix

    hs has 42 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-gallery.js - About 5 hrs to fix

      Function setup has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

      Calendar.setup = function (params) {
          function param_default(pname, def) {
              if (typeof params[pname] == "undefined") {
                  params[pname] = def;
              }
      Severity: Minor
      Found in assets/js/jscalendar/calendar-setup.js - 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 loadHTML has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

              loadHTML: function () {
                  var s = this.cachedGet || this.xhr.responseText,
                      regBody;
                  if (this.pre) hs.cachedGets[this.src] = s;
                  if (!hs.ie || hs.uaVersion >= 5.5) {
      Severity: Minor
      Found in assets/images/js/highslide/highslide-full.js - 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 showHideElements has a Cognitive Complexity of 37 (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.js - 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 loadHTML has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

              loadHTML: function () {
                  var s = this.cachedGet || this.xhr.responseText,
                      regBody;
                  if (this.pre) hs.cachedGets[this.src] = s;
                  if (!hs.ie || hs.uaVersion >= 5.5) {
      Severity: Minor
      Found in assets/images/js/highslide/highslide-with-html.js - 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 showHideElements has a Cognitive Complexity of 37 (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-html.js - 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 AlphaChannelFlatten has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

          public function AlphaChannelFlatten()
          {
              if (!$this->is_alpha) {
                  // image doesn't have alpha transparency, no need to flatten
                  $this->DebugMessage('skipping AlphaChannelFlatten() because !$this->is_alpha', __FILE__, __LINE__);
      Severity: Minor
      Found in thumbs/phpthumb.class.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 setup has 137 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Calendar.setup = function (params) {
          function param_default(pname, def) {
              if (typeof params[pname] == "undefined") {
                  params[pname] = def;
              }
      Severity: Major
      Found in assets/js/jscalendar/calendar-setup.js - About 5 hrs to fix

        Function _diag has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
        Open

            public function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
            {
                $flip = false;
        
                if ($xlim - $xoff > $ylim - $yoff) {
        Severity: Minor
        Found in include/Text_Diff.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 get_xoops_search_result has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
        Open

                public function get_xoops_search_result($keywords, $andor, $limit, $offset, $uid)
                {
                    // �����׻�
                    $tzoffset = ($this->user_TZ - $this->server_TZ) * 3600;
        
        
        Severity: Minor
        Found in class/APCal_xoops.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 output_ics has 134 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function output_ics()
                {
                    // $event_id �����ꤵ��Ƥ��ʤ���н�λ
                    if (empty($_GET['event_id']) && empty($_POST['event_ids'])) {
                        die(_APCAL_ERR_INVALID_EVENT_ID);
        Severity: Major
        Found in class/APCal.php - About 5 hrs to fix

          prototype has 40 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-gallery.js - About 5 hrs to fix

            Function get_flags_date_has_events has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
            Open

                    public function get_flags_date_has_events($range_start_s, $range_end_s, $mode = '')
                    {
                        // ���餫����������������Ƥ���
                        /* for ($time = $start ; $time < $end ; $time += 86400) {
                    $ret[ date( 'j' , $time ) ] = 0 ;
            Severity: Minor
            Found in class/APCal.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 getBmp has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getBmp($bgColor)
                {
                    $out = '';
            
                    if (!$this->m_bLoaded) {
            Severity: Minor
            Found in thumbs/phpthumb.gif.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 crossfade has 128 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    crossfade: function (up, to, from) {
                        if (!up) return;
                        var exp = this,
                            last = this.last,
                            x = this.x,
            Severity: Major
            Found in assets/images/js/highslide/highslide-full.js - About 5 hrs to fix

              File mytplsadmin.php has 379 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/mytplsadmin.php - About 5 hrs to fix

                Function justify has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                        justify: function (p, moveOnly) {
                            var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
                
                            var hasMovedMin = false;
                
                
                Severity: Minor
                Found in assets/images/js/highslide/highslide.js - 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 changeSize has a Cognitive Complexity of 34 (exceeds 5 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/images/js/highslide/highslide.js - 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 diff has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function diff($from_lines, $to_lines)
                    {
                        $n_from = count($from_lines);
                        $n_to   = count($to_lines);
                
                
                Severity: Minor
                Found in include/Text_Diff.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

                Severity
                Category
                Status
                Source
                Language