XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Method rebuild_cat_tree has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function rebuild_cat_tree($cat_table)
{
    global $conn, $xoopsDB;

    $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
Severity: Minor
Found in admin/categories.php - About 1 hr to fix

    Method copy_templates_f2db has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function copy_templates_f2db($tplset_to, $whr_append = '1')
    {
        global $db;
    
        // get tplsource
    Severity: Minor
    Found in admin/mytplsadmin.php - About 1 hr to fix

      Method get_todays_time_description has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public function get_todays_time_description(
                  $start,
                  $end,
                  $ynj,
                  $justify = true,
      Severity: Minor
      Found in class/APCal.php - About 1 hr to fix

        Method URLreadFsock has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function URLreadFsock($host, $file, &$errstr, $successonly = true, $port = 80, $timeout = 10)
            {
                if (!function_exists('fsockopen') || phpthumb_functions::FunctionIsDisabled('fsockopen')) {
                    $errstr = 'fsockopen() unavailable';
        
        
        Severity: Minor
        Found in thumbs/phpthumb.functions.php - About 1 hr to fix

          Function run has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  run: function () {
                      var xhr;
                      if (!this.src) this.src = hs.getSrc(this.a);
                      if (this.src.match('#')) {
                          var arr = this.src.split('#');
          Severity: Minor
          Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

            Method myblocksadmin_update_blockinstance has 44 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function myblocksadmin_update_blockinstance(
                $id,
                $bside,
                $bweight,
                $bvisible,
            Severity: Minor
            Found in include/blocksadmin.inc.php - About 1 hr to fix

              Function run has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      run: function () {
                          var xhr;
                          if (!this.src) this.src = hs.getSrc(this.a);
                          if (this.src.match('#')) {
                              var arr = this.src.split('#');
              Severity: Minor
              Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

                Method display_edit_form has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function display_edit_form($cat, $form_title, $action)
                {
                    global $cattree, $xoopsModuleConfig;
                
                    // Beggining of XoopsForm
                Severity: Minor
                Found in admin/categories.php - About 1 hr to fix

                  Method render has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function render($diff)
                      {
                          $xi      = $yi = 1;
                          $block   = false;
                          $context = array();
                  Severity: Minor
                  Found in include/Text_Diff_Renderer.php - About 1 hr to fix

                    Method get_categories_selform has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public function get_categories_selform($get_target = '', $smode = null)
                            {
                                global $xoopsModule;
                    
                                if (empty($this->categories)) {
                    Severity: Minor
                    Found in class/APCal.php - About 1 hr to fix

                      Function tableMouseUp has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                      Calendar.tableMouseUp = function (ev) {
                          var cal = Calendar._C;
                          if (!cal) {
                              return false;
                          }
                      Severity: Minor
                      Found in assets/js/jscalendar/calendar.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 dim has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                              dim: function (exp) {
                                  if (!hs.dimmer) {
                                      isNew = true;
                                      hs.dimmer = hs.createElement('div', {
                                          className: 'highslide-dimming highslide-viewport-size',
                      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 htmlPrepareClose has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                              htmlPrepareClose: function () {
                                  if (hs.geckoMac) { // bad redraws
                                      if (!hs.mask) hs.mask = hs.createElement('div', null,
                                          {position: 'absolute'}, hs.container);
                                      hs.setStyles(hs.mask, {
                      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 _compareseq has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function _compareseq($xoff, $xlim, $yoff, $ylim)
                          {
                              /* Slide down the bottom initial diagonal. */
                              while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff]) {
                                  ++$xoff;
                      Severity: Minor
                      Found in include/Text_Diff.php - 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 notify_new_event has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public function notify_new_event($event_id)
                              {
                                  $rs    = $GLOBALS['xoopsDB']->query("SELECT summary,admission,categories,class,uid,groupid FROM $this->table WHERE id='$event_id'");
                                  $event = $GLOBALS['xoopsDB']->fetchObject($rs);
                      
                      
                      Severity: Minor
                      Found in class/APCal_xoops.php - 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 import_ics_via_fopen has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public function import_ics_via_fopen($uri, $force_http = true, $user_uri = '')
                              {
                                  if (strlen($uri) < 5) {
                                      return '-1:';
                                  }
                      Severity: Minor
                      Found in class/APCal.php - 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 GetCode has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function GetCode(&$data, $bInit)
                          {
                              if ($bInit) {
                                  $this->CurBit   = 0;
                                  $this->LastBit  = 0;
                      Severity: Minor
                      Found in thumbs/phpthumb.gif.php - 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

                      Method get_yearly has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public function get_yearly($get_target = '', $query_string = '', $for_print = false)
                              {
                                  // $PHP_SELF = $_SERVER['SCRIPT_NAME'] ;
                                  // if( $get_target == '' ) $get_target = $PHP_SELF ;
                      
                      
                      Severity: Minor
                      Found in class/APCal.php - About 1 hr to fix

                        Method convertmycontacts has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function convertmycontacts($strcontact)
                        {
                            // Ermitteln aller einzelnen Wörter von Kontakt aus Termin piCal
                            // Umwandeln der einzelnen Namen in Link auf Benutzerkonto, wenn Name ein Mitgliedsname ist
                            $strsearch    = ' ';
                        Severity: Minor
                        Found in include/ro_contacthandler.php - About 1 hr to fix

                          Function showYearsCombo has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          Calendar.showYearsCombo = function (fwd) {
                              var cal = Calendar._C;
                              if (!cal) {
                                  return false;
                              }
                          Severity: Minor
                          Found in assets/js/jscalendar/calendar.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language