XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        cancelLoading: function () {
            hs.discardElement(this.wrapper);
            hs.expanders[this.key] = null;
            if (this.loading) hs.loading.style.left = '-9999px';
        },
Severity: Major
Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 1 hr to fix
assets/images/js/highslide/highslide.js on lines 1421..1425

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 71.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    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 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 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

          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 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 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 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 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 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 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 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

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                          if (this.maincontent) {
                              var body = hs.getElementByClass(this.content, 'div', 'highslide-body');
                              if (body) body.appendChild(this.maincontent);
                              this.maincontent.style.display = 'block';
                          }
              Severity: Major
              Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 1 hr to fix
              assets/images/js/highslide/highslide-with-html.js on lines 1321..1325

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 70.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                          if (this.maincontent) {
                              var body = hs.getElementByClass(this.content, 'div', 'highslide-body');
                              if (body) body.appendChild(this.maincontent);
                              this.maincontent.style.display = 'block';
                          }
              Severity: Major
              Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 1 hr to fix
              assets/images/js/highslide/highslide-full.js on lines 1537..1541

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 70.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              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

                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

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          getAdjacentAnchor: function (op) {
                              var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
                              return (as && as[current + op]) || null;
                          },
                  Severity: Major
                  Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 1 hr to fix
                  assets/images/js/highslide/highslide.js on lines 1407..1410

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 69.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                  Calendar.findYear = function (el) {
                      if (typeof el.year != "undefined") {
                          return el;
                      } else if (typeof el.parentNode.year != "undefined") {
                          return el.parentNode;
                  Severity: Major
                  Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
                  assets/js/jscalendar/calendar.js on lines 233..240

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 69.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Severity
                  Category
                  Status
                  Source
                  Language