XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Method ImageMagickCommandlineBase has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function ImageMagickCommandlineBase()
    {
        static $commandline = null;
        if (is_null($commandline)) {
            if ($this->issafemode) {
Severity: Major
Found in thumbs/phpthumb.class.php - About 2 hrs to fix

    Method apcal_mini_calendar_show has 67 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function apcal_mini_calendar_show($options)
        {
            global $xoopsConfig, $xoopsDB, $xoopsUser;
    
            $moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
    Severity: Major
    Found in blocks/apcal_mini_calendar.php - About 2 hrs to fix

      Function contentLoaded has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              contentLoaded: function () {
                  try {
                      if (!this.content) return;
                      this.content.onload = null;
                      if (this.onLoadStarted) return;
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

        Function positionOverlay has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                positionOverlay: function (overlay) {
                    var p = overlay.position || 'middle center',
                        relToVP = (overlay.relativeTo == 'viewport'),
                        offX = overlay.offsetX,
                        offY = overlay.offsetY;
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-gallery.js - About 2 hrs to fix

          Function positionOverlay has 66 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  positionOverlay: function (overlay) {
                      var p = overlay.position || 'middle center',
                          relToVP = (overlay.relativeTo == 'viewport'),
                          offX = overlay.offsetX,
                          offY = overlay.offsetY;
          Severity: Major
          Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

            Method DropShadow has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function DropShadow(&$gdimg, $distance, $width, $hexcolor, $angle, $alpha)
                {
                    if (phpthumb_functions::gd_version() < 2) {
                        return false;
                    }
            Severity: Major
            Found in thumbs/phpthumb.filters.php - About 2 hrs to fix

              Method myblocksadmin_update_block has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function myblocksadmin_update_block(
                  $bid,
                  $bside,
                  $bweight,
                  $bvisible,
              Severity: Major
              Found in include/blocksadmin.inc.php - About 2 hrs to fix

                Method _shiftBoundaries has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function _shiftBoundaries($lines, &$changed, $other_changed)
                    {
                        $i = 0;
                        $j = 0;
                
                
                Severity: Major
                Found in include/Text_Diff.php - About 2 hrs to fix

                  Function fade has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                          fade: function (up, to) {
                              this.outlineWhileAnimating = false;
                              var exp = this, t = up ? hs.expandDuration : 0;
                  
                              if (up) {
                  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 fade has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                          fade: function (up, to) {
                              this.outlineWhileAnimating = false;
                              var exp = this, t = up ? hs.expandDuration : 0;
                  
                              if (up) {
                  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 ApplyMask has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function ApplyMask(&$gdimg_mask, &$gdimg_image)
                      {
                          if (phpthumb_functions::gd_version() < 2) {
                              $this->DebugMessage('Skipping ApplyMask() because gd_version is "' . phpthumb_functions::gd_version() . '"', __FILE__, __LINE__);
                  
                  
                  Severity: Minor
                  Found in thumbs/phpthumb.filters.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

                  Method _diag has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _diag($xoff, $xlim, $yoff, $ylim, $nchunks)
                      {
                          $flip = false;
                  
                          if ($xlim - $xoff > $ylim - $yoff) {
                  Severity: Major
                  Found in include/Text_Diff.php - About 2 hrs to fix

                    Function changeSize has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            changeSize: function (up, to, dur) {
                    
                                if (this.outline && !this.outlineWhileAnimating) {
                                    if (up) this.outline.setPosition();
                                    else this.outline.destroy(
                    Severity: Major
                    Found in assets/images/js/highslide/highslide-with-html.js - About 2 hrs to fix

                      Method get_coming_schedule has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public function get_coming_schedule($get_target = '', $num = 5)
                              {
                                  // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;
                      
                                  $ret = '';
                      Severity: Major
                      Found in class/APCal.php - About 2 hrs to fix

                        Method RedirectToCachedFile has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function RedirectToCachedFile()
                        {
                            global $phpThumb;
                        
                            $nice_cachefile = str_replace(DIRECTORY_SEPARATOR, '/', $phpThumb->cache_filename);
                        Severity: Major
                        Found in thumbs/phpThumb.php - About 2 hrs to fix

                          Method HistogramStretch has 64 lines of code (exceeds 25 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: Major
                          Found in thumbs/phpthumb.filters.php - About 2 hrs to fix

                            Function htmlCreate has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    htmlCreate: function () {
                                        if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
                            
                                        this.content = hs.getCacheBinding(this.a);
                                        if (!this.content)
                            Severity: Major
                            Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

                              Method MaxFileSize has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function MaxFileSize()
                                  {
                                      if (phpthumb_functions::gd_version() < 2) {
                                          $this->DebugMessage('Skipping MaxFileSize() because gd_version is "' . phpthumb_functions::gd_version() . '"', __FILE__, __LINE__);
                              
                              
                              Severity: Major
                              Found in thumbs/phpthumb.class.php - About 2 hrs to fix

                                Function step has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                                step: function (val, args) {
                                                    var pos = args.pos,
                                                        invPos = 1 - pos;
                                                    var prop,
                                                        size = {},
                                Severity: Major
                                Found in assets/images/js/highslide/highslide-with-gallery.js - About 2 hrs to fix

                                  Function step has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                  step: function (val, args) {
                                                      var pos = args.pos,
                                                          invPos = 1 - pos;
                                                      var prop,
                                                          size = {},
                                  Severity: Major
                                  Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language