XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Method rrule_from_post has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function rrule_from_post($start, $allday_flag)
        {
            // �����֤�̵���ʤ顢̵���Ƕ�ʸ������֤�
            if ($_POST['rrule_freq'] === 'none') {
                return '';
Severity: Major
Found in class/APCal.php - About 3 hrs to fix

    Method LZWCommand has 87 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function LZWCommand(&$data, $bInit)
        {
            if ($bInit) {
                $this->SetCodeSize = ord($data{0});
                $data              = substr($data, 1);
    Severity: Major
    Found in thumbs/phpthumb.gif.php - About 3 hrs to fix

      Method rrule_to_human_language has 86 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public function rrule_to_human_language($rrule)
              {
                  $rrule = trim($rrule);
                  if ($rrule === '') {
                      return '';
      Severity: Major
      Found in class/APCal.php - About 3 hrs to fix

        Method AntiOffsiteLinking has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function AntiOffsiteLinking()
            {
                // Optional anti-offsite hijacking of the thumbnail script
                $allow = true;
                if ($allow && $this->config_nooffsitelink_enabled
        Severity: Major
        Found in thumbs/phpthumb.class.php - About 3 hrs to fix

          Function htmlSizeOperations has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

                  htmlSizeOperations: function () {
          
                      this.setObjContainerSize(this.innerContent);
          
          
          
          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 writeExtendedContent has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

                  writeExtendedContent: function () {
                      if (this.hasExtendedContent) return;
                      var exp = this;
                      this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
                      if (this.objectType == 'iframe') {
          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 writeExtendedContent has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

                  writeExtendedContent: function () {
                      if (this.hasExtendedContent) return;
                      var exp = this;
                      this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
                      if (this.objectType == 'iframe') {
          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 htmlSizeOperations has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

                  htmlSizeOperations: function () {
          
                      this.setObjContainerSize(this.innerContent);
          
          
          
          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 ImageMagickCommandlineBase has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ImageMagickCommandlineBase()
              {
                  static $commandline = null;
                  if (is_null($commandline)) {
                      if ($this->issafemode) {
          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 RenderOutput has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              public function RenderOutput()
              {
                  if (!$this->useRawIMoutput && !is_resource($this->gdimg_output)) {
                      $this->DebugMessage('RenderOutput() failed because !is_resource($this->gdimg_output)', __FILE__, __LINE__);
          
          
          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 setCacheDirectory has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              public function setCacheDirectory()
              {
                  // resolve cache directory to absolute pathname
                  $this->DebugMessage('setCacheDirectory() starting with config_cache_directory = "' . $this->config_cache_directory . '"', __FILE__, __LINE__);
                  if (substr($this->config_cache_directory, 0, 1) == '.') {
          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 URLreadFsock has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function URLreadFsock($host, $file, &$errstr, $successonly = true, $port = 80, $timeout = 10)
              {
                  if (!function_exists('fsockopen') || phpthumb_functions::FunctionIsDisabled('fsockopen')) {
                      $errstr = 'fsockopen() unavailable';
          
          
          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

          Function HistogramStretch has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              public function HistogramStretch(&$gdimg, $band = '*', $method = 0, $threshold = 0.1)
              {
                  // equivalent of "Auto Contrast" in Adobe Photoshop
                  // method 0 stretches according to RGB colors. Gives a more conservative stretch.
                  // method 1 band stretches according to grayscale which is color-biased (59% green, 30% red, 11% blue). May give a punchier / more aggressive stretch, possibly appearing over-saturated
          Severity: Minor
          Found in thumbs/phpthumb.filters.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 ErrorImage has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function ErrorImage($text, $width = 0, $height = 0, $forcedisplay = false)
              {
                  $width  = ($width ?: $this->config_error_image_width);
                  $height = ($height ?: $this->config_error_image_height);
          
          
          Severity: Major
          Found in thumbs/phpthumb.class.php - About 3 hrs to fix

            File myblocksadmin2.php has 305 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            // ------------------------------------------------------------------------- //
            //                     myblocksadmin_for_2.2.php                             //
            //                - XOOPS block admin for each modules -                     //
            //                          GIJOE <http://www.peak.ne.jp/>                   //
            Severity: Minor
            Found in admin/myblocksadmin2.php - About 3 hrs to fix

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

                Method WatermarkOverlay has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function WatermarkOverlay(
                        &$gdimg_dest,
                        &$img_watermark,
                        $alignment = '*',
                        $opacity = 50,
                Severity: Major
                Found in thumbs/phpthumb.filters.php - About 3 hrs to fix

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

                    Function Expander has 82 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-full.js - About 3 hrs to fix

                      Function showAtElement has 82 lines of code (exceeds 25 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: Major
                      Found in assets/js/jscalendar/calendar.js - About 3 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language