XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function mouseClickHandler has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        mouseClickHandler: function (e) {
            if (!e) e = window.event;
            if (e.button > 1) return true;
            if (!e.target) e.target = e.srcElement;

Severity: Major
Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

    Function changeSize has 59 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-with-gallery.js - About 2 hrs to fix

      Method render has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function render()
          {
              global $xoopsGTicket;
      
              // load all child ids for javascript codes
      Severity: Major
      Found in admin/mygrouppermform.php - About 2 hrs to fix

        Method ImageBorder has 59 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
            {
                $border_width = ($border_width ?: 1);
                $radius_x     = ($radius_x ?: 0);
                $radius_y     = ($radius_y ?: 0);
        Severity: Major
        Found in thumbs/phpthumb.filters.php - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (!@$_GET['w'] && !@$_GET['wp'] && !@$_GET['wl'] && !@$_GET['ws'] && !@$_GET['h'] && !@$_GET['hp']
                      && !@$_GET['hl']
                      && !@$_GET['hs']
                  ) {
                      // no resizing needed
          Severity: Critical
          Found in thumbs/phpThumb.php - About 2 hrs to fix

            Function init has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    init: function () {
                        if (!hs.container) {
            
                            hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                            hs.ieLt9 = hs.ie && hs.uaVersion < 9;
            Severity: Major
            Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

              Method gd_info has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function gd_info()
                  {
                      static $gd_info = array();
                      if (empty($gd_info)) {
                          // based on code by johnschaefer at gmx dot de
              Severity: Major
              Found in thumbs/phpthumb.functions.php - About 2 hrs to fix

                Function mouseClickHandler has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        mouseClickHandler: function (e) {
                            if (!e) e = window.event;
                            if (e.button > 1) return true;
                            if (!e.target) e.target = e.srcElement;
                
                
                Severity: Major
                Found in assets/images/js/highslide/highslide-with-html.js - About 2 hrs to fix

                  Method __construct has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public function __construct($target_date = '', $language = 'japanese', $reload = false)
                          {
                              // ���դΥ��å�
                              if ($target_date) {
                                  $this->set_date($target_date);
                  Severity: Major
                  Found in class/APCal.php - About 2 hrs to fix

                    Method ImprovedImageRotate has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static function ImprovedImageRotate(
                            &$gdimg_source,
                            $rotate_angle = 0,
                            $config_background_hexcolor = 'FFFFFF',
                            $bg = null,
                    Severity: Major
                    Found in thumbs/phpthumb.filters.php - About 2 hrs to fix

                      Function get_coming_time_description has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public function get_coming_time_description($start, $now, $admission = true)
                              {
                                  // ��ǧ��̵ͭ�ˤ�äƥɥå�GIF���ؤ���
                                  if ($admission) {
                                      $dot = '';
                      Severity: Minor
                      Found in class/APCal.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

                      Function savepictures has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public function savepictures($event_id)
                              {
                                  xoops_load('xoopsmediauploader');
                                  $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/apcal', array(
                                      'image/gif',
                      Severity: Minor
                      Found in class/APCal.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

                      Function ResolveSource has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function ResolveSource()
                          {
                              if (is_resource($this->gdimg_source)) {
                                  $this->DebugMessage('ResolveSource() exiting because is_resource($this->gdimg_source)', __FILE__, __LINE__);
                      
                      
                      Severity: Minor
                      Found in thumbs/phpthumb.class.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

                      Function CalculateThumbnailDimensions has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function CalculateThumbnailDimensions()
                          {
                              $this->DebugMessage('CalculateThumbnailDimensions() starting with [W,H,sx,sy,sw,sh] initially set to ['
                                                  . $this->source_width
                                                  . ','
                      Severity: Minor
                      Found in thumbs/phpthumb.class.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

                      Function resolvePath has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function resolvePath($path, $allowed_dirs)
                          {
                              $this->DebugMessage('resolvePath: ' . $path . ' (allowed_dirs: ' . print_r($allowed_dirs, true) . ')', __FILE__, __LINE__);
                      
                              // add base path to the top of the list
                      Severity: Minor
                      Found in thumbs/phpthumb.class.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

                      Function OffsiteDomainIsAllowed has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function OffsiteDomainIsAllowed($hostname, $allowed_domains)
                          {
                              static $domain_is_allowed = array();
                              $hostname = strtolower($hostname);
                              if (!isset($domain_is_allowed[$hostname])) {
                      Severity: Minor
                      Found in thumbs/phpthumb.class.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

                      Function Colorize has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function Colorize(&$gdimg, $amount, $targetColor)
                          {
                              $amount      = (is_numeric($amount) ? $amount : 25);
                              $amountPct   = $amount / 100;
                              $targetColor = (phpthumb_functions::IsHexColor($targetColor) ? $targetColor : 'gray');
                      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

                      Function ImageBorder has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
                          {
                              $border_width = ($border_width ?: 1);
                              $radius_x     = ($radius_x ?: 0);
                              $radius_y     = ($radius_y ?: 0);
                      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

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

                              positionOverlay: function (overlay) {
                                  var p = overlay.position || 'middle center',
                                      offX = overlay.offsetX,
                                      offY = overlay.offsetY;
                                  if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
                      Severity: Major
                      Found in assets/images/js/highslide/highslide.js - About 2 hrs to fix

                        Method check has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                public function check($post = true, $area = '')
                                {
                                    global $xoopsModule;
                        
                                    $this->_errors = array();
                        Severity: Major
                        Found in include/gtickets.php - About 2 hrs to fix
                          Severity
                          Category
                          Status
                          Source
                          Language