XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function Expander has 76 lines of code (exceeds 25 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: Major
Found in assets/images/js/highslide/highslide-with-html.js - About 3 hrs to fix

    Method AlphaChannelFlatten has 76 lines of code (exceeds 25 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: Major
    Found in thumbs/phpthumb.class.php - About 3 hrs to fix

      Function tableMouseOver has 75 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Calendar.tableMouseOver = function (ev) {
          var cal = Calendar._C;
          if (!cal) {
              return;
          }
      Severity: Major
      Found in assets/js/jscalendar/calendar.js - About 3 hrs to fix

        Function Expander has 75 lines of code (exceeds 25 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: Major
        Found in assets/images/js/highslide/highslide.js - About 3 hrs to fix

          Method Rotate has 75 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function Rotate()
              {
                  if ($this->ra || $this->ar) {
                      if (!function_exists('ImageRotate')) {
                          $this->DebugMessage('!function_exists(ImageRotate)', __FILE__, __LINE__);
          Severity: Major
          Found in thumbs/phpthumb.class.php - About 3 hrs to fix

            Method getBmp has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getBmp($bgColor)
                {
                    $out = '';
            
                    if (!$this->m_bLoaded) {
            Severity: Major
            Found in thumbs/phpthumb.gif.php - About 2 hrs to fix

              Method GD2ICOstring has 74 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function GD2ICOstring(&$gd_image_array)
                  {
                      foreach ($gd_image_array as $key => $gd_image) {
                          $ImageWidths[$key]  = imagesx($gd_image);
                          $ImageHeights[$key] = imagesy($gd_image);
              Severity: Major
              Found in thumbs/phpthumb.ico.php - About 2 hrs to fix

                File myblocksadmin.php has 289 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/myblocksadmin.php - About 2 hrs to fix

                  Function changeSize has 73 lines of code (exceeds 25 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: Major
                  Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

                    Method diff has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function diff($from_lines, $to_lines)
                        {
                            $n_from = count($from_lines);
                            $n_to   = count($to_lines);
                    
                    
                    Severity: Major
                    Found in include/Text_Diff.php - About 2 hrs to fix

                      Method getPng has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getPng($bgColor)
                          {
                              $out = '';
                      
                              if (!$this->m_bLoaded) {
                      Severity: Major
                      Found in thumbs/phpthumb.gif.php - About 2 hrs to fix

                        Method SafeURLread has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function SafeURLread($url, &$error, $timeout = 10, $followredirects = true)
                            {
                                $error = '';
                        
                                $parsed_url                      = phpthumb_functions::ParseURLbetter($url);
                        Severity: Major
                        Found in thumbs/phpthumb.functions.php - About 2 hrs to fix

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

                                  updateAnchors: function () {
                                      var el, els, all = [], images = [], htmls = [], 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-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 21 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  getOverlays: function () {
                                      this.getInline(['heading', 'caption'], true);
                                      if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
                                      if (hs.showCredits) this.writeCredits();
                                      for (var i = 0; i < hs.overlays.length; 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 focus has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  focus: function () {
                                      this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                                      // blur others
                                      for (var i = 0; i < hs.expanders.length; i++) {
                                          if (hs.expanders[i] && i == hs.focusKey) {
                          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 21 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  updateAnchors: function () {
                                      var el, els, all = [], images = [], htmls = [], 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-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 createOverlay has a Cognitive Complexity of 21 (exceeds 5 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/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 focus has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  focus: function () {
                                      this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                                      // blur others
                                      for (var i = 0; i < hs.expanders.length; i++) {
                                          if (hs.expanders[i] && i == hs.focusKey) {
                          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 createOverlay has a Cognitive Complexity of 21 (exceeds 5 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/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 getParsedTemplate has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  public function getParsedTemplate($name = '')
                                  {
                                      $name = strtoupper($name);
                          
                                      //  if a name was given, parse only this template
                          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

                          Severity
                          Category
                          Status
                          Source
                          Language