XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function htmlCreate has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        htmlCreate: function () {

            this.content = hs.getCacheBinding(this.a);
            if (!this.content)
                this.content = hs.getNode(this.contentId);
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 3 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 sizeOverlayBox has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        sizeOverlayBox: function (doWrapper, doPanels) {
            var overlayBox = this.overlayBox,
                x = this.x,
                y = this.y;
            hs.setStyles(overlayBox, {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 3 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 sizeOverlayBox has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        sizeOverlayBox: function (doWrapper, doPanels) {
            var overlayBox = this.overlayBox,
                x = this.x,
                y = this.y;
            hs.setStyles(overlayBox, {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 3 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 getWrapperKey has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        getWrapperKey: function (element, expOnly) {
            var el, re = /^highslide-wrapper-([0-9]+)$/;
            // 1. look in open expanders
            el = element;
            while (el.parentNode) {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 3 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 getWrapperKey has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        getWrapperKey: function (element, expOnly) {
            var el, re = /^highslide-wrapper-([0-9]+)$/;
            // 1. look in open expanders
            el = element;
            while (el.parentNode) {
Severity: Minor
Found in assets/images/js/highslide/highslide.js - About 3 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 sizeOverlayBox has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        sizeOverlayBox: function (doWrapper, doPanels) {
            var overlayBox = this.overlayBox,
                x = this.x,
                y = this.y;
            hs.setStyles(overlayBox, {
Severity: Minor
Found in assets/images/js/highslide/highslide.js - About 3 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 setSize has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        setSize: function (i) {
            var exp = this.exp;
            if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                this.imgSize = i;
                this.size = Math.max(this.size, this.imgSize);
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 3 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 onGraphicLoad has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        onGraphicLoad: function () {
            var o = this.offset = this.graphic.width / 4,
                pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
            for (var i = 0; i <= 8; i++) {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 3 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 onGraphicLoad has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        onGraphicLoad: function () {
            var o = this.offset = this.graphic.width / 4,
                pos = [[0, 0], [0, -4], [-2, 0], [0, -8], 0, [-2, -8], [0, -2], [0, -6], [-2, -2]],
                dim = {height: (2 * o) + 'px', width: (2 * o) + 'px'};
            for (var i = 0; i <= 8; i++) {
Severity: Minor
Found in assets/images/js/highslide/highslide.js - About 3 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 make_cal_link has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        public function make_cal_link($get_target = '', $smode = 'Monthly', $cid = 0, $caldate = '')
        {
            global $xoopsModule;

            if ($cid < 0) {
Severity: Minor
Found in class/APCal.php - About 3 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 delete_schedule has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
Open

        public function delete_schedule($whr_sql_append = '', $eval_after = null)
        {
            if (!empty($_POST['event_id'])) {
                $event_id = (int)$_POST['event_id'];

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

        public function get_time_desc_for_a_day(
            $event,
            $tzoffset,
            $border_for_2400,
            $justify = true,
Severity: Minor
Found in class/APCal.php - About 3 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_calendar_information has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

            // ���ܾ���
Severity: Major
Found in class/APCal.php - About 3 hrs to fix

    Consider simplifying this complex logical expression.
    Open

                    if (!$isAllCat && !$isDefaultView && !$isToday) {
                        $link = XOOPS_URL . "/modules/apcal/$cat-$smode-$caldate";
                    } elseif (!$isAllCat && !$isDefaultView && $isToday) {
                        $link = XOOPS_URL . "/modules/apcal/$cat-$smode";
                    } elseif (!$isAllCat && $isDefaultView && !$isToday) {
    Severity: Critical
    Found in class/APCal.php - About 3 hrs to fix

      File pluginsmanager.php has 319 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/pluginsmanager.php - About 3 hrs to fix

        Function parseDate has 91 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Date.parseDate = function (str, fmt) {
            var today = new Date();
            var y = 0;
            var m = -1;
            var d = 0;
        Severity: Major
        Found in assets/js/jscalendar/calendar.js - About 3 hrs to fix

          Function crossfade has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

                  crossfade: function (up, to, from) {
                      if (!up) return;
                      var exp = this,
                          last = this.last,
                          x = this.x,
          Severity: Minor
          Found in assets/images/js/highslide/highslide-full.js - About 3 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 ImageCreateFromFilename has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ImageCreateFromFilename($filename)
              {
                  // try to create GD image source directly via GD, if possible,
                  // rather than buffering to memory and creating with ImageCreateFromString
                  $ImageCreateWasAttempted = false;
          Severity: Minor
          Found in thumbs/phpthumb.class.php - About 3 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 getPng has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getPng($bgColor)
              {
                  $out = '';
          
                  if (!$this->m_bLoaded) {
          Severity: Minor
          Found in thumbs/phpthumb.gif.php - About 3 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 SafeURLread has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function SafeURLread($url, &$error, $timeout = 10, $followredirects = true)
              {
                  $error = '';
          
                  $parsed_url                      = phpthumb_functions::ParseURLbetter($url);
          Severity: Minor
          Found in thumbs/phpthumb.functions.php - About 3 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