XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function get_monthly_html has a Cognitive Complexity of 78 (exceeds 5 allowed). Consider refactoring.
Open

        public function get_monthly_html($get_target = '', $query_string = '', $for_print = false)
        {
            $tpl = new XoopsTpl();

            // Set days width
Severity: Minor
Found in class/APCal.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

File phpthumb.bmp.php has 657 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/////////////////////////////////////////////////////////////////
/// getID3() by James Heinrich <info@getid3.org>               //
//  available at http://getid3.sourceforge.net                 //
//            or http://www.getid3.org                         //
Severity: Major
Found in thumbs/phpthumb.bmp.php - About 1 day to fix

    File phpThumb.php has 637 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    //////////////////////////////////////////////////////////////
    //   phpThumb() by James Heinrich <info@silisoftware.com>   //
    //        available at http://phpthumb.sourceforge.net      //
    //         and/or https://github.com/JamesHeinrich/phpThumb //
    Severity: Major
    Found in thumbs/phpThumb.php - About 1 day to fix

      Function contentLoaded has a Cognitive Complexity of 71 (exceeds 5 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-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 _init has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring.
      Open

      Calendar.prototype._init = function (firstDayOfWeek, date) {
          var today = new Date(),
              TY = today.getFullYear(),
              TM = today.getMonth(),
              TD = today.getDate();
      Severity: Minor
      Found in assets/js/jscalendar/calendar.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 WatermarkText has 271 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function WatermarkText(
              &$gdimg,
              $text,
              $size,
              $alignment,
      Severity: Major
      Found in thumbs/phpthumb.filters.php - About 1 day to fix

        Method SourceImageToGD has 270 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function SourceImageToGD()
            {
                if (is_resource($this->gdimg_source)) {
                    $this->source_width  = imagesx($this->gdimg_source);
                    $this->source_height = imagesy($this->gdimg_source);
        Severity: Major
        Found in thumbs/phpthumb.class.php - About 1 day to fix

          Function _keyEvent has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
          Open

          Calendar._keyEvent = function (ev) {
              var cal = window._dynarch_popupCalendar;
              if (!cal || cal.multiple)
                  return false;
              (Calendar.is_ie) && (ev = window.event);
          Severity: Minor
          Found in assets/js/jscalendar/calendar.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 ExtractEXIFgetImageSize has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ExtractEXIFgetImageSize()
              {
                  $this->DebugMessage('starting ExtractEXIFgetImageSize()', __FILE__, __LINE__);
          
                  if (preg_match('#^http:#i', $this->src) && !$this->sourceFilename && $this->rawImageData) {
          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 get_weekly_html has 265 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public function get_weekly_html($get_target = '')
                  {
                      $roimage = XOOPS_URL . '/modules/apcal/assets/images/regonline/regonline.png'; // added by goffy: image for online registration
                      $ret     = "
               <table border='0' cellspacing='0' cellpadding='0' width='100%' style='border-collapse:collapse;margin:0px;'>
          Severity: Major
          Found in class/APCal.php - About 1 day to fix

            Function getInline has a Cognitive Complexity of 67 (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 (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
                            else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
            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 rrule_to_form has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
            Open

                    public function rrule_to_form($rrule, $until_init)
                    {
                        // �ƽ���ͤ�����
                        $norrule_checked       = '';
                        $daily_checked         = '';
            Severity: Minor
            Found in class/APCal.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 apcal_minical_ex_show has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
            Open

                function apcal_minical_ex_show($options)
                {
                    global $xoopsConfig, $xoopsDB, $xoopsUser;
            
                    // speed check
            Severity: Minor
            Found in blocks/apcal_minical_ex.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 cellClick has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
            Open

            Calendar.cellClick = function (el, ev) {
                var cal = el.calendar;
                var closing = false;
                var newdate = false;
                var date = null;
            Severity: Minor
            Found in assets/js/jscalendar/calendar.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 output_ics has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
            Open

                    public function output_ics()
                    {
                        // $event_id �����ꤵ��Ƥ��ʤ���н�λ
                        if (empty($_GET['event_id']) && empty($_POST['event_ids'])) {
                            die(_APCAL_ERR_INVALID_EVENT_ID);
            Severity: Minor
            Found in class/APCal.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 contentLoaded has a Cognitive Complexity of 63 (exceeds 5 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-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 getInline has a Cognitive Complexity of 63 (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-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

            Method assign_event_list has 246 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public function assign_event_list(&$tpl, $get_target = '')
                    {
                        $pos = isset($_GET['pos']) ? (int)$_GET['pos'] : 0;
                        $num = isset($_GET['num']) ? (int)$_GET['num'] : 20;
            
            
            Severity: Major
            Found in class/APCal_xoops.php - About 1 day to fix

              Function assign_event_list has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
              Open

                      public function assign_event_list(&$tpl, $get_target = '')
                      {
                          $pos = isset($_GET['pos']) ? (int)$_GET['pos'] : 0;
                          $num = isset($_GET['num']) ? (int)$_GET['num'] : 20;
              
              
              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 gd_info has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
              Open

                  function gd_info()
                  {
                      static $gd_info = array();
                      if (empty($gd_info)) {
                          // based on code by johnschaefer at gmx dot de
              Severity: Minor
              Found in thumbs/phpthumb.functions.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

              Severity
              Category
              Status
              Source
              Language