XoopsModules25x/smallworld

View on GitHub

Showing 759 of 1,838 total issues

Function size has 85 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.effects.size = function (o) {

        return this.queue(function () {

            // Create element
Severity: Major
Found in assets/js/jquery-ui-1.8.11.custom.js - About 3 hrs to fix

    Method parsePubArray has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function parsePubArray($updatesarray, $id)
        {
            /**
             * @var \XoopsModules\Smallworld\Helper $helper
             * @var \XoopsModules\Smallworld\SwUserHandler $swUserHandler
    Severity: Major
    Found in class/WallUpdates.php - About 3 hrs to fix

      Function _doKeyDown has 84 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _doKeyDown: function(event) {
              var onSelect, dateStr, sel,
                  inst = $.datepicker._getInst(event.target),
                  handled = true,
                  isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
      Severity: Major
      Found in assets/js/jqueryui.min.js - About 3 hrs to fix

        Function Animation has 84 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Animation( elem, properties, options ) {
            var result,
                stopped,
                index = 0,
                length = animationPrefilters.length,
        Severity: Major
        Found in assets/js/jquery.min.js - About 3 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
                          (t == 'checkbox' || t == 'radio') && !el.checked ||
                          (t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
                          tag == 'select' && el.selectedIndex == -1))
                      return null;
          Severity: Critical
          Found in assets/js/jquery.form.js - About 3 hrs to fix

            Function smallworld_DoValStart has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function smallworld_DoValStart() {
                xoops_smallworld(document).ready(function () {
                    // Attact validation to registeration parts in register form
                    if (smallworldvalidationstrength != 0) {
                        xoops_smallworld("#smallworld_profileform-next-0").hide();
            Severity: Major
            Found in assets/js/smallworld.js - About 3 hrs to fix

              Function _chunkedUpload has 83 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      _chunkedUpload: function (options, testOnly) {
                          var that = this,
                              file = options.files[0],
                              fs = file.size,
                              ub = options.uploadedBytes = options.uploadedBytes || 0,
              Severity: Major
              Found in assets/js/jquery.fileupload.js - About 3 hrs to fix

                Function send has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                send: function (_, completeCallback) {
                                    form = $('<form style="display:none;"></form>');
                                    form.attr('accept-charset', options.formAcceptCharset);
                                    addParamChar = /\?/.test(options.url) ? '&' : '?';
                                    // XDomainRequest only supports GET and POST:
                Severity: Major
                Found in assets/js/jquery.iframe-transport.js - About 3 hrs to fix

                  Function _toggle has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          _toggle: function (toShow, toHide, data, clickedIsActive, down) {
                              var self = this,
                                  options = self.options;
                  
                              self.toShow = toShow;
                  Severity: Major
                  Found in assets/js/jquery-ui-1.8.11.custom.js - About 3 hrs to fix

                    Function smallworld_remDir has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function smallworld_remDir($userid, $directory, $empty = false)
                        {
                            //@todo verify $userid should be int and then sanitize $userid accordingly before
                            //      executing this routine
                            if (!empty($userid)) {
                    Severity: Minor
                    Found in class/SwDatabase.php - About 3 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 smallworld_remDir has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function smallworld_remDir($userid, $directory, $empty = false)
                        {
                            if ('' != $userid) {
                                if ('/' === mb_substr($directory, -1)) {
                                    $directory = mb_substr($directory, 0, -1);
                    Severity: Minor
                    Found in class/DoSync.php - About 3 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 validate has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        xoops_smallworld.fn.validate = function (options) {
                            options = xoops_smallworld.extend({
                                expression: "return true;",
                                message: "",
                                error_class: "ValidationErrors",
                    Severity: Major
                    Found in assets/js/jquery.validate.js - About 3 hrs to fix

                      Function h has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          var h = function (b) {
                              var c, h, i, j, k, l = b.length;
                              var m = 1732584193;
                              var n = -271733879;
                              var o = -1732584194;
                      Severity: Major
                      Found in assets/js/jquery.oembed.js - About 3 hrs to fix

                        Function formatDate has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            formatDate: function (format, date, settings) {
                                if (!date) {
                                    return "";
                                }
                        
                        
                        Severity: Major
                        Found in assets/js/jqueryui.min.js - About 3 hrs to fix

                          File Admin.php has 298 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          
                          namespace XoopsModules\Smallworld;
                          
                          /**
                          Severity: Minor
                          Found in class/Admin.php - About 3 hrs to fix

                            Function _clear has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    _clear: function (event, noPropagation) {
                            
                                        this.reverting = false;
                                        // We delay all events that have to be triggered to after the point where the placeholder has been removed and
                                        // everything else normalized again
                            Severity: Major
                            Found in assets/js/jquery-ui-1.8.11.custom.js - About 3 hrs to fix

                              Function topratedusers has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function topratedusers($direction)
                                  {
                                      $array = [];
                              
                                      if ('up' === $direction) {
                              Severity: Minor
                              Found in class/Admin.php - About 3 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 parsePubArray has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function parsePubArray($updatesarray, $id)
                                  {
                                      /**
                                       * @var \XoopsModules\Smallworld\Helper $helper
                                       * @var \XoopsModules\Smallworld\SwUserHandler $swUserHandler
                              Severity: Minor
                              Found in class/WallUpdates.php - About 3 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 parsePubArray has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function parsePubArray($updatesarray, $id)
                                  {
                                      /**
                                       * @var \XoopsModules\Smallworld\Helper $helper
                                       * @var \XoopsModules\Smallworld\SwUserHandler $swUserHandler
                              Severity: Minor
                              Found in class/PublicWallUpdates.php - About 3 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 array_to_json has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function array_to_json($array)
                              {
                                  if (!is_array($array)) {
                                      return false;
                                  }
                              Severity: Minor
                              Found in tags.php - About 3 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