XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

APCal has 65 functions (exceeds 20 allowed). Consider refactoring.
Open

    class APCal
    {
        // SKELTON (they will be defined in language files)
        public $holidays           = array();
        public $date_short_names   = array();
Severity: Major
Found in class/APCal.php - About 1 day to fix

    Function getInline has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

            getInline: function (types, addOverlay) {
                for (var i = 0; i < types.length; i++) {
                    var type = types[i], s = null;
                    if (!this[type + 'Id'] && this.thumbsUserSetId)
                        this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-html.js - About 1 day 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 getInline has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

            getInline: function (types, addOverlay) {
                for (var i = 0; i < types.length; i++) {
                    var type = types[i], s = null;
                    if (!this[type + 'Id'] && this.thumbsUserSetId)
                        this[type + 'Id'] = type + '-for-' + this.thumbsUserSetId;
    Severity: Minor
    Found in assets/images/js/highslide/highslide.js - About 1 day 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 phpThumbDebug has 233 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function phpThumbDebug($level = '')
        {
            if ($level && ($this->phpThumbDebug !== $level)) {
                return true;
            }
    Severity: Major
    Found in thumbs/phpthumb.class.php - About 1 day to fix

      Function changeSize has a Cognitive Complexity of 59 (exceeds 5 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: Minor
      Found in assets/images/js/highslide/highslide-full.js - About 1 day 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 59 (exceeds 5 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 day 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_blockarray_coming_event has a Cognitive Complexity of 59 (exceeds 5 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: Minor
      Found in class/APCal_xoops.php - About 1 day 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 mouseClickHandler has a Cognitive Complexity of 58 (exceeds 5 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: Minor
      Found in assets/images/js/highslide/highslide-full.js - About 1 day 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 58 (exceeds 5 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 day 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 210 lines of code (exceeds 25 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: Major
      Found in assets/js/jscalendar/calendar.js - About 1 day to fix

        Method parse has 210 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function parse($filename, $calendar_name)
            {
                $ifile = @fopen($filename, 'r');
                if ($ifile === false) {
                    return "-1: File cannot open. filename: $filename";
        Severity: Major
        Found in class/iCal_parser.php - About 1 day to fix

          Method rrule_to_form has 210 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public function rrule_to_form($rrule, $until_init)
                  {
                      // �ƽ���ͤ�����
                      $norrule_checked       = '';
                      $daily_checked         = '';
          Severity: Major
          Found in class/APCal.php - About 1 day to fix

            phpthumb has 58 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class phpthumb
            {
            
                // public:
                // START PARAMETERS (for object mode and phpThumb.php)
            Severity: Major
            Found in thumbs/phpthumb.class.php - About 1 day to fix

              Function Rotate has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function Rotate()
                  {
                      if ($this->ra || $this->ar) {
                          if (!function_exists('ImageRotate')) {
                              $this->DebugMessage('!function_exists(ImageRotate)', __FILE__, __LINE__);
              Severity: Minor
              Found in thumbs/phpthumb.class.php - About 1 day 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 list_blockinstances has 203 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function list_blockinstances()
              {
                  global $query4redirect, $block_arr, $xoopsGTicket;
              
                  $myts = MyTextSanitizer::getInstance();
              Severity: Major
              Found in admin/myblocksadmin2.php - About 1 day to fix

                Method get_monthly_html has 202 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public function get_monthly_html($get_target = '', $query_string = '', $for_print = false)
                        {
                            $tpl = new XoopsTpl();
                
                            // Set days width
                Severity: Major
                Found in class/APCal.php - About 1 day to fix

                  Function Expander has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                  Open

                      hs.Expander = function (a, params, custom, contentType) {
                          if (document.readyState && hs.ie && !hs.isReady) {
                              hs.addEventListener(document, 'ready', function () {
                                  new hs.Expander(a, params, custom, contentType);
                              });
                  Severity: Minor
                  Found in assets/images/js/highslide/highslide-full.js - About 7 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 parseDate has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                  Open

                  Date.parseDate = function (str, fmt) {
                      var today = new Date();
                      var y = 0;
                      var m = -1;
                      var d = 0;
                  Severity: Minor
                  Found in assets/js/jscalendar/calendar.js - About 7 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 list_blockinstances has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function list_blockinstances()
                  {
                      global $query4redirect, $block_arr, $xoopsGTicket;
                  
                      $myts = MyTextSanitizer::getInstance();
                  Severity: Minor
                  Found in admin/myblocksadmin2.php - About 7 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_daily_html has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public function get_daily_html($get_target = '')
                          {
                              $roimage = XOOPS_URL . '/modules/apcal/assets/images/regonline/regonline.png'; // added by goffy: image for online registration
                              // get the result of plugins
                              $plugin_returns = array();
                  Severity: Minor
                  Found in class/APCal.php - About 7 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