XoopsModules25x/smallworld

View on GitHub

Showing 1,838 of 1,838 total issues

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

                    case 39:
                        if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
                        handled = event.ctrlKey || event.metaKey;
                        // +1 day on ctrl or command +right
                        if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
Severity: Major
Found in assets/js/jquery-ui-1.8.11.custom.js and 1 other location - About 5 hrs to fix
assets/js/jquery-ui-1.8.11.custom.js on lines 8751..8759

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

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

    _appendTo: function() {
        var element = this.options.appendTo;

        if ( element ) {
            element = element.jquery || element.nodeType ?
Severity: Major
Found in assets/js/jqueryui.min.js and 1 other location - About 5 hrs to fix
assets/js/jqueryui.min.js on lines 11581..11599

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

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

    _appendTo: function() {
        var element = this.options.appendTo;

        if ( element ) {
            element = element.jquery || element.nodeType ?
Severity: Major
Found in assets/js/jqueryui.min.js and 1 other location - About 5 hrs to fix
assets/js/jqueryui.min.js on lines 7310..7328

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

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

                    case 37:
                        if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
                        handled = event.ctrlKey || event.metaKey;
                        // -1 day on ctrl or command +left
                        if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
Severity: Major
Found in assets/js/jquery-ui-1.8.11.custom.js and 1 other location - About 5 hrs to fix
assets/js/jquery-ui-1.8.11.custom.js on lines 8764..8772

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

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 position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.fn.position = function( options ) {
    if ( !options || !options.of ) {
        return _position.apply( this, arguments );
    }

Severity: Major
Found in assets/js/jqueryui.min.js - About 5 hrs to fix

    Function _create has 147 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _create: function () {
                var self = this,
                    doc = this.element[0].ownerDocument,
                    suppressKeyPress;
    
    
    Severity: Major
    Found in assets/js/jquery-ui-1.8.11.custom.js - About 5 hrs to fix

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

                      left: (
                          pos.left                                                                // The absolute mouse position
                          + this.offset.relative.left * mod                                        // Only for relative positioned nodes: Relative offset from element to offset parent
                          + this.offset.parent.left * mod                                            // The offsetParent's offset without borders (offset + border)
                          - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : (this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft()) * mod)
      Severity: Major
      Found in assets/js/jquery-ui-1.8.11.custom.js and 1 other location - About 5 hrs to fix
      assets/js/jquery-ui-1.8.11.custom.js on lines 1355..1360

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

      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

                      top: (
                          pos.top                                                                    // The absolute mouse position
                          + this.offset.relative.top * mod                                        // Only for relative positioned nodes: Relative offset from element to offset parent
                          + this.offset.parent.top * mod                                            // The offsetParent's offset without borders (offset + border)
                          - ($.browser.safari && $.browser.version < 526 && this.cssPosition == 'fixed' ? 0 : (this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : (scrollIsRootNode ? 0 : scroll.scrollTop())) * mod)
      Severity: Major
      Found in assets/js/jquery-ui-1.8.11.custom.js and 1 other location - About 5 hrs to fix
      assets/js/jquery-ui-1.8.11.custom.js on lines 1361..1366

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

      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

                  if ( !o.axis || o.axis !== "x" ) {
                      if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {
                          scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
                      } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
                          scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
      Severity: Major
      Found in assets/js/jqueryui.min.js and 1 other location - About 5 hrs to fix
      assets/js/jqueryui.min.js on lines 2501..2507

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

      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

                              that._transition($(this)).done(
                                  function () {
                                      var node = $(this);
                                      template = that._renderDownload([file])
                                          .replaceAll(node);
      Severity: Major
      Found in assets/js/jquery.fileupload-ui.js and 1 other location - About 5 hrs to fix
      assets/js/jquery.fileupload-ui.js on lines 215..230

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

      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

                  if ( !o.axis || o.axis !== "y" ) {
                      if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {
                          scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
                      } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
                          scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
      Severity: Major
      Found in assets/js/jqueryui.min.js and 1 other location - About 5 hrs to fix
      assets/js/jqueryui.min.js on lines 2493..2499

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

      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

                                  that._transition($(this)).done(
                                      function () {
                                          var node = $(this);
                                          template = that._renderDownload([file])
                                              .replaceAll(node);
      Severity: Major
      Found in assets/js/jquery.fileupload-ui.js and 1 other location - About 5 hrs to fix
      assets/js/jquery.fileupload-ui.js on lines 156..171

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

      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

      File blocksadmin.php has 406 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /*
       * You may not change or alter any portion of this comment or credits
       * of supporting developers from this source code or any supporting source code
       * which is considered copyrighted (c) material of the original comment or credit authors.
      Severity: Minor
      Found in admin/blocksadmin.php - About 5 hrs to fix

        UploadHandler has 42 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class UploadHandler
        {
            protected $options;
        
            // PHP File Upload error message codes:
        Severity: Minor
        Found in class/UploadHandler.php - About 5 hrs to fix

          Function _create has 141 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  _create: function () {
                      // for handling static scoping inside callbacks
                      var that = this;
          
                      // There are 2 kinds of DOM nodes this widget can be instantiated on:
          Severity: Major
          Found in assets/js/tag-it.js - About 5 hrs to fix

            Method smallworld_includeScripts has 140 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function smallworld_includeScripts()
            {
                /** @var \XoopsModules\Smallworld\Helper $helper */
                $helper = Helper::getInstance();
                $page = basename($_SERVER['PHP_SELF'], '.php');
            Severity: Major
            Found in include/functions.php - About 5 hrs to fix

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

                          el.animate(animation, {
                              queue: false, duration: o.duration, easing: o.options.easing, complete: function () {
                                  if (mode == 'hide') el.hide(); // Hide
                                  $.effects.restore(el, props);
                                  $.effects.removeWrapper(el); // Restore
              Severity: Major
              Found in assets/js/jquery-ui-1.8.11.custom.js and 1 other location - About 5 hrs to fix
              assets/js/jquery-ui-1.8.11.custom.js on lines 11137..11145

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

              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

                          el.animate(animation, {
                              queue: false, duration: o.duration, easing: o.options.easing, complete: function () {
                                  if (mode == 'hide') el.hide(); // Hide
                                  $.effects.restore(el, props);
                                  $.effects.removeWrapper(el); // Restore
              Severity: Major
              Found in assets/js/jquery-ui-1.8.11.custom.js and 1 other location - About 5 hrs to fix
              assets/js/jquery-ui-1.8.11.custom.js on lines 11711..11719

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

              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

              File tag-it.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
              * jQuery UI Tag-it!
              *
              * @version v2.0 (06/2011)
              *
              Severity: Minor
              Found in assets/js/tag-it.js - About 5 hrs to fix

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

                            if (hit) {
                                // SELECT
                                if (selectee.selected) {
                                    selectee.$element.removeClass("ui-selected");
                                    selectee.selected = false;
                Severity: Major
                Found in assets/js/jqueryui.min.js and 1 other location - About 5 hrs to fix
                assets/js/jquery-ui-1.8.11.custom.js on lines 3090..3142

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

                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