XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function htmlPrepareClose has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        htmlPrepareClose: function () {
            if (hs.geckoMac) { // bad redraws
                if (!hs.mask) hs.mask = hs.createElement('div', null,
                    {position: 'absolute'}, hs.container);
                hs.setStyles(hs.mask, {
Severity: Minor
Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr 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 calcExpanded has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

        calcExpanded: function () {
            var exp = this.exp;
            this.justify = 'auto';

            // get alignment
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr 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 render has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function render($currentoption = 1, $display = true)
    {
        global $modversion;
        $_dirname = $this->_obj->getVar('dirname');
        $i        = 0;
Severity: Minor
Found in class/adminMenu.php - About 1 hr 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 Sepia has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public function Sepia(&$gdimg, $amount, $targetColor)
    {
        $amount      = (is_numeric($amount) ? max(0, min(100, $amount)) : 50);
        $amountPct   = $amount / 100;
        $targetColor = (phpthumb_functions::IsHexColor($targetColor) ? $targetColor : 'A28065');
Severity: Minor
Found in thumbs/phpthumb.filters.php - About 1 hr 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 GetAllFilesInSubfolders has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

    public static function GetAllFilesInSubfolders($dirname)
    {
        $AllFiles = array();
        $dirname  = rtrim(realpath($dirname), '/\\');
        if ($dirhandle = @opendir($dirname)) {
Severity: Minor
Found in thumbs/phpthumb.functions.php - About 1 hr 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 justify has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        justify: function (p, moveOnly) {
            var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';

            if (tgt && tgt.match(/ /)) {
                tgtArr = tgt.split(' ');
Severity: Minor
Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

    Function htmlSizeOperations has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            htmlSizeOperations: function () {
    
                this.setObjContainerSize(this.innerContent);
    
    
    
    Severity: Minor
    Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

      Function tableMouseUp has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Calendar.tableMouseUp = function (ev) {
          var cal = Calendar._C;
          if (!cal) {
              return false;
          }
      Severity: Minor
      Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

        Function hideShowCovered has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Calendar.prototype.hideShowCovered = function () {
            if (!Calendar.is_ie && !Calendar.is_opera)
                return;
            function getVisib(obj) {
                var value = obj.style.visibility;
        Severity: Minor
        Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

          Function justify has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  justify: function (p, moveOnly) {
                      var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
          
                      if (tgt && tgt.match(/ /)) {
                          tgtArr = tgt.split(' ');
          Severity: Minor
          Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

            Function htmlSizeOperations has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    htmlSizeOperations: function () {
            
                        this.setObjContainerSize(this.innerContent);
            
            
            
            Severity: Minor
            Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

              Method _renderOptionTree has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
                  {
                      $tree .= $prefix
                               . '<input type="checkbox" name="'
                               . $this->getName()
              Severity: Minor
              Found in admin/mygrouppermform.php - About 1 hr to fix

                Function contentLoaded has 47 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: Minor
                Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

                  Method make_cal_link has 47 lines of code (exceeds 25 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 1 hr to fix

                    Function keyHandler has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            keyHandler: function (e) {
                                if (!e) e = window.event;
                                if (!e.target) e.target = e.srcElement; // ie
                                if (typeof e.target.form != 'undefined') return true; // form element has focus
                                if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
                    Severity: Minor
                    Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

                      Method get_sql_set has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public function get_sql_set($cols)
                              {
                                  $ret = '';
                      
                                  foreach ($cols as $col => $types) {
                      Severity: Minor
                      Found in class/APCal.php - About 1 hr to fix

                        Method resolvePath has 46 lines of code (exceeds 25 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 1 hr to fix

                          Function continuation_for_the_fucking_khtml_browser has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              Calendar.continuation_for_the_fucking_khtml_browser = function () {
                                  var w = self.element.offsetWidth;
                                  var h = self.element.offsetHeight;
                                  self.element.style.display = "none";
                                  var valign = opts.substr(0, 1);
                          Severity: Minor
                          Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                            Function keyHandler has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    keyHandler: function (e) {
                                        if (!e) e = window.event;
                                        if (!e.target) e.target = e.srcElement; // ie
                                        if (typeof e.target.form != 'undefined') return true; // form element has focus
                                        var exp = hs.getExpander();
                            Severity: Minor
                            Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

                              Function init has 45 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: Minor
                              Found in assets/images/js/highslide/highslide.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language