XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Method GetAllFilesInSubfolders has 27 lines of code (exceeds 25 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

    Function focus has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            focus: function () {
                this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                // blur others
                for (var i = 0; i < hs.expanders.length; i++) {
                    if (hs.expanders[i] && i == hs.focusKey) {
    Severity: Minor
    Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

      Method apcal_todays_schedule_edit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function apcal_todays_schedule_edit($options)
          {
              global $xoopsDB, $xoopsConfig;
      
              $moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
      Severity: Minor
      Found in blocks/apcal_todays_schedule.php - About 1 hr to fix

        Method apcal_thedays_schedule_edit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function apcal_thedays_schedule_edit($options)
            {
                global $xoopsDB, $xoopsConfig;
        
                $moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
        Severity: Minor
        Found in blocks/apcal_thedays_schedule.php - About 1 hr to fix

          Method get_vtimezones_str has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public function get_vtimezones_str($timezones)
                  {
                      if (empty($timezones)) {
                          return "BEGIN:VTIMEZONE\r
          TZID:GMT\r
          Severity: Minor
          Found in class/APCal.php - About 1 hr to fix

            Method load has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function load($lpData, &$hdrLen)
                {
                    $hdrLen = 0;
            
                    $this->m_lpVer = substr($lpData, 0, 6);
            Severity: Minor
            Found in thumbs/phpthumb.gif.php - About 1 hr to fix

              Method Frame has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function Frame(&$gdimg, $frame_width, $edge_width, $hexcolor_frame, $hexcolor1, $hexcolor2)
                  {
                      $frame_width    = ($frame_width ?: 5);
                      $edge_width     = ($edge_width ?: 1);
                      $hexcolor_frame = ($hexcolor_frame ?: 'CCCCCC');
              Severity: Minor
              Found in thumbs/phpthumb.filters.php - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                            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.js - About 1 hr to fix

                  Method get_todays_time_description has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                              $start,
                              $end,
                              $ynj,
                              $justify = true,
                              $admission = true,
                  Severity: Major
                  Found in class/APCal.php - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                                                if ($this->iar && ((int)$this->w > 0) && ((int)$this->h > 0)) {
                                                    list($nw, $nh) = phpthumb_functions::TranslateWHbyAngle($this->w, $this->h, $this->ra);
                                                    $nw          = ((round($nw) != 0) ? round($nw) : '');
                                                    $nh          = ((round($nh) != 0) ? round($nh) : '');
                                                    $commandline .= ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement($nw . 'x' . $nh . '!');
                    Severity: Major
                    Found in thumbs/phpthumb.class.php - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                      if ((!isset($_GET['action']) || $_GET['action'] === '') && isset($_GET['cid']) && !is_numeric($_GET['cid'])) {
                          $cat_title = addslashes($_GET['cid']);
                          $cat       = $GLOBALS['xoopsDB']->queryF("SELECT cid FROM {$GLOBALS['xoopsDB']->prefix('apcal_cat')} WHERE cat_shorttitle LIKE '$cat_title' LIMIT 0,1");
                      
                          if ($cat && $GLOBALS['xoopsDB']->getRowsNum($cat)) {
                      Severity: Major
                      Found in index.php - About 1 hr to fix

                        Function genOverlayBox has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                genOverlayBox: function () {
                                    if (!this.overlayBox) this.overlayBox = hs.createElement(
                                        'div', {
                                            className: this.wrapperClassName
                                        }, {
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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 _initMultipleDates has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Calendar.prototype._initMultipleDates = function () {
                            if (this.multiple) {
                                for (var i in this.multiple) {
                                    var cell = this.datesCells[i];
                                    var d = this.multiple[i];
                        Severity: Minor
                        Found in assets/js/jscalendar/calendar.js - About 55 mins 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 setStyles has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                setStyles: function (el, styles) {
                                    for (var x in styles) {
                                        if (hs.ieLt9 && x == 'opacity') {
                                            if (styles[x] > 0.99) el.style.removeAttribute('filter');
                                            else el.style.filter = 'alpha(opacity=' + (styles[x] * 100) + ')';
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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 replaceLang has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                replaceLang: function (s) {
                                    s = s.replace(/\s/g, ' ');
                                    var re = /{hs\.lang\.([^}]+)\}/g,
                                        matches = s.match(re),
                                        lang;
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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 resize has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                resize: function (e) {
                                    var w, h, r = e.width / e.height;
                                    w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
                                    if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
                                    h = this.isHtml ? e.height + e.dY : w / r;
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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 checkFirstAndLast has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                checkFirstAndLast: function () {
                                    if (this.repeat || !this.controls) return;
                                    var exp = hs.expanders[this.expKey],
                                        cur = exp.getAnchorIndex(),
                                        re = /disabled$/;
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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 imageCreate has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                imageCreate: function () {
                                    var exp = this;
                        
                                    var img = document.createElement('img');
                                    this.content = img;
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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 getAdjacentAnchor has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                getAdjacentAnchor: function (op) {
                                    var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
                                    if (as && !as[current + op] && this.slideshow && this.slideshow.repeat) {
                                        if (op == 1) return as[0];
                                        else if (op == -1) return as[as.length - 1];
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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 getAnchorIndex has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                        Open

                                getAnchorIndex: function () {
                                    var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
                                    if (arr) for (var i = 0; i < arr.length; i++) {
                                        if (arr[i] == this.a) return i;
                                    }
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-full.js - About 55 mins 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