XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Method get_formtextdateselect has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function get_formtextdateselect($name, $ymd, $long_ymdn = '')
        {
            require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';

            // day of week starting
Severity: Major
Found in class/APCal_xoops.php - About 2 hrs to fix

    Method get_date_schedule has 51 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function changeSize has 50 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: Minor
      Found in assets/images/js/highslide/highslide.js - About 2 hrs to fix

        Consider simplifying this complex logical expression.
        Open

        if (isset($_POST['delete'])) {
        
            // Ticket Check
            if (!$xoopsGTicket->check()) {
                redirect_header(XOOPS_URL . '/', 3, $xoopsGTicket->getErrors());
        Severity: Critical
        Found in admin/events.php - About 2 hrs to fix

          Method copy_templates_db2db has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function copy_templates_db2db($tplset_from, $tplset_to, $whr_append = '1')
          {
              global $db;
          
              // get tplfile and tplsource
          Severity: Minor
          Found in admin/mytplsadmin.php - About 2 hrs to fix

            Method setCacheDirectory has 50 lines of code (exceeds 25 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 2 hrs to fix

              Method render has 50 lines of code (exceeds 25 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 2 hrs to fix

                Method xoops_module_install_apcal has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function xoops_module_install_apcal(XoopsModule $xoopsModule)
                {
                    require_once  __DIR__ . '/../../../mainfile.php';
                    require_once  __DIR__ . '/../include/config.php';
                
                
                Severity: Minor
                Found in include/oninstall.php - About 1 hr to fix

                  Method version_compare_replacement_sub has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static function version_compare_replacement_sub($version1, $version2, $operator = '')
                      {
                          // If you specify the third optional operator argument, you can test for a particular relationship.
                          // The possible operators are: <, lt, <=, le, >, gt, >=, ge, ==, =, eq, !=, <>, ne respectively.
                          // Using this argument, the function will return 1 if the relationship is the one specified by the operator, 0 otherwise.
                  Severity: Minor
                  Found in thumbs/phpthumb.functions.php - About 1 hr to fix

                    Function init has 48 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-with-html.js - About 1 hr to fix

                      Method output_setsqls has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function output_setsqls()
                          {
                              $rets = array();
                      
                              foreach ($this->events as $uid => $event) {
                      Severity: Minor
                      Found in class/iCal_parser.php - About 1 hr to fix

                        Method HistogramOverlay has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function HistogramOverlay(
                                &$gdimg,
                                $bands = '*',
                                $colors = '',
                                $width = 0.25,
                        Severity: Minor
                        Found in thumbs/phpthumb.filters.php - About 1 hr to fix

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

                                  expand: function (a, params, custom, type) {
                                      if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
                                      if (typeof a.getParams == 'function') return params;
                                      if (type == 'html') {
                                          for (var i = 0; i < hs.sleeping.length; i++) {
                          Severity: Minor
                          Found in assets/images/js/highslide/highslide-full.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-full.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 destroyOverlays has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  destroyOverlays: function () {
                                      if (!this.overlays.length) return;
                                      if (this.slideshow) {
                                          var c = this.slideshow.controls;
                                          if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                          Severity: Minor
                          Found in assets/images/js/highslide/highslide-full.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 getPosition has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  getPosition: function (el) {
                                      if (/area/i.test(el.tagName)) {
                                          var imgs = document.getElementsByTagName('img');
                                          for (var i = 0; i < imgs.length; i++) {
                                              var u = imgs[i].useMap;
                          Severity: Minor
                          Found in assets/images/js/highslide/highslide-full.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 awake has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  awake: function () {
                                      try {
                          
                                          hs.expanders[this.key] = this;
                          
                          
                          Severity: Minor
                          Found in assets/images/js/highslide/highslide-full.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 init has a Cognitive Complexity of 15 (exceeds 5 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-full.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 expand has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  expand: function (a, params, custom, type) {
                                      if (!a) a = hs.createElement('a', null, {display: 'none'}, hs.container);
                                      if (typeof a.getParams == 'function') return params;
                                      if (type == 'html') {
                                          for (var i = 0; i < hs.sleeping.length; i++) {
                          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 init has a Cognitive Complexity of 15 (exceeds 5 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-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

                          Severity
                          Category
                          Status
                          Source
                          Language