XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function crossfade has 124 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        crossfade: function (up, to, from) {
            if (!up) return;
            var exp = this,
                last = this.last,
                x = this.x,
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js - About 4 hrs to fix

    Function dragHandler has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

            dragHandler: function (e) {
                if (!hs.dragArgs) return true;
                if (!e) e = window.event;
                var a = hs.dragArgs, exp = a.exp;
                if (exp.iframe) {
    Severity: Minor
    Found in assets/images/js/highslide/highslide-full.js - About 4 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 justify has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

            justify: function (p, moveOnly) {
                var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
    
                var hasMovedMin = false;
    
    
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-html.js - About 4 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 get_minical_ex has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

            public function get_minical_ex($gifaday = 2, $just1gif = 0, $plugins = array())
            {
                $db   = XoopsDatabaseFactory::getDatabaseConnection();
                $myts = MyTextSanitizer::getInstance();
    
    
    Severity: Minor
    Found in class/APCal_xoops.php - About 4 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 get_mini_calendar_html has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

            public function get_mini_calendar_html($get_target = '', $query_string = '', $mode = '')
            {
                // �¹Ի��ַ�¬��������
                // list( $usec , $sec ) = explode( " " , microtime() ) ;
                // $apcalstarttime = $sec + $usec ;
    Severity: Minor
    Found in class/APCal.php - About 4 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 LZWCommand has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

        public function LZWCommand(&$data, $bInit)
        {
            if ($bInit) {
                $this->SetCodeSize = ord($data{0});
                $data              = substr($data, 1);
    Severity: Minor
    Found in thumbs/phpthumb.gif.php - About 4 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 cellClick has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Calendar.cellClick = function (el, ev) {
        var cal = el.calendar;
        var closing = false;
        var newdate = false;
        var date = null;
    Severity: Major
    Found in assets/js/jscalendar/calendar.js - About 4 hrs to fix

      Function Thumbstrip has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          hs.Thumbstrip = function (slideshow) {
              function add(exp) {
                  hs.extend(options || {}, {
                      overlayId: dom,
                      hsId: 'thumbstrip',
      Severity: Major
      Found in assets/images/js/highslide/highslide-full.js - About 4 hrs to fix

        Function Thumbstrip has 122 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            hs.Thumbstrip = function (slideshow) {
                function add(exp) {
                    hs.extend(options || {}, {
                        overlayId: dom,
                        hsId: 'thumbstrip',
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-gallery.js - About 4 hrs to fix

          hs has 37 functions (exceeds 20 allowed). Consider refactoring.
          Open

              var hs = {
          // Language strings
                  lang: {
                      cssDirection: 'ltr',
                      loadingText: 'Loading...',
          Severity: Minor
          Found in assets/images/js/highslide/highslide.js - About 4 hrs to fix

            phpthumb_filters has 37 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class phpthumb_filters
            {
                public $phpThumbObject = null;
            
                // removed for XOOPS
            Severity: Minor
            Found in thumbs/phpthumb.filters.php - About 4 hrs to fix

              Function myblocksadmin_update_block has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
              Open

              function myblocksadmin_update_block(
                  $bid,
                  $bside,
                  $bweight,
                  $bvisible,
              Severity: Minor
              Found in include/blocksadmin.inc.php - About 4 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 get_todays_time_description has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
              Open

                      public function get_todays_time_description(
                          $start,
                          $end,
                          $ynj,
                          $justify = true,
              Severity: Minor
              Found in class/APCal.php - About 4 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 get_blockarray_coming_event has 118 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public function get_blockarray_coming_event($get_target = '', $num = 5, $for_coming = false, $untildays = 0)
                      {
                          // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;
                          $now = $for_coming ? time() : $this->unixtime + $this->day_start;
              
              
              Severity: Major
              Found in class/APCal_xoops.php - About 4 hrs to fix

                Function focus has a Cognitive Complexity of 31 (exceeds 5 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 4 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 createOverlay has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                Open

                        createOverlay: function (o) {
                            var el = o.overlayId,
                                relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
                            if (typeof el == 'string') el = hs.getNode(el);
                            if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                Severity: Minor
                Found in assets/images/js/highslide/highslide-full.js - About 4 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 create has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                Open

                Calendar.prototype.create = function (_par) {
                    var parent = null;
                    if (!_par) {
                        // default parent is the document body, in which case we create
                        // a popup calendar.
                Severity: Minor
                Found in assets/js/jscalendar/calendar.js - About 4 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 setSize has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                Open

                        setSize: function (i) {
                            var exp = this.exp;
                            if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                                this.imgSize = i;
                                this.size = Math.max(this.size, this.imgSize);
                Severity: Minor
                Found in assets/images/js/highslide/highslide-full.js - About 4 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 focus has a Cognitive Complexity of 31 (exceeds 5 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-with-html.js - About 4 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 apcal_mini_calendar_show has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                Open

                    function apcal_mini_calendar_show($options)
                    {
                        global $xoopsConfig, $xoopsDB, $xoopsUser;
                
                        $moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
                Severity: Minor
                Found in blocks/apcal_mini_calendar.php - About 4 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

                Severity
                Category
                Status
                Source
                Language