XoopsModules25x/smallworld

View on GitHub

Showing 759 of 1,838 total issues

Function clip has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var effectClip = $.effects.effect.clip = function( o, done ) {
    // Create element
    var el = $( this ),
        props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
        mode = $.effects.setMode( el, o.mode || "hide" ),
Severity: Minor
Found in assets/js/jqueryui.min.js - About 1 hr to fix

    Function _onProgress has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            _onProgress: function (e, data) {
                if (e.lengthComputable) {
                    var now = +(new Date()),
                        total,
                        loaded;
    Severity: Minor
    Found in assets/js/jquery.fileupload.js - About 1 hr to fix

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

                          send: function (headers, completeCallback) {
                              var addParamChar = /\?/.test(s.url) ? '&' : '?';
      
                              function callback(status, statusText, responses, responseHeaders) {
                                  xdr.onload = xdr.onerror = xdr.ontimeout = $.noop;
      Severity: Minor
      Found in assets/js/cors/jquery.xdr-transport.js - About 1 hr to fix

        Function _generatePosition has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                _generatePosition: function (event) {
        
                    var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
        
                    // This is another very weird special case that only happens for relative elements:
        Severity: Minor
        Found in assets/js/jquery-ui-1.8.11.custom.js - About 1 hr to fix

          Function createWrapper has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  createWrapper: function (element) {
          
                      // if the element is already wrapped, return it
                      if (element.parent().is('.ui-effects-wrapper')) {
                          return element.parent();
          Severity: Minor
          Found in assets/js/jquery-ui-1.8.11.custom.js - About 1 hr to fix

            Method post has 36 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function post()
                {
                    $upload = isset($_FILES[$this->field_name]) ? $_FILES[$this->field_name] : [
                        'tmp_name' => null,
                        'name'     => null,
            Severity: Minor
            Found in class/uploadclass.php - About 1 hr to fix

              Method post has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function post()
                  {
                      $upload = isset($_FILES[$this->field_name]) ? $_FILES[$this->field_name] : [
                          'tmp_name' => null,
                          'name'     => null,
              Severity: Minor
              Found in class/SwUploadHandler.php - About 1 hr to fix

                Function smallworld_getCountFriendMessagesEtcJS has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                function smallworld_getCountFriendMessagesEtcJS() {
                    xoops_smallworld.ajax({
                        url: smallworld_url + "Get_Count.php?SmallworldGetUserMsgCount=1" + "&rndnum=" + Math.floor(Math.random() * 101),
                        cache: false,
                        dataType: "json",
                Severity: Minor
                Found in assets/js/smallworld.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 handlePosts has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function handlePosts()
                    {
                        $GLOBALS['xoopsLogger']->activated = false;
                        if ($GLOBALS['xoopsUser'] && $GLOBALS['xoopsUser'] instanceof \XoopsUser) {
                            $uid = $GLOBALS['xoopsUser']->uid();
                Severity: Minor
                Found in class/SwDatabase.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 rotateImage has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function rotateImage()
                    {
                        // check file extension
                        switch ($this->imageMimetype) {
                            case 'image/png':
                Severity: Minor
                Found in class/Common/Resizer.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 _hideDatepicker has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _hideDatepicker: function(input) {
                        var showAnim, duration, postProcess, onClose,
                            inst = this._curInst;
                
                        if (!inst || (input && inst !== $.data(input, "datepicker"))) {
                Severity: Minor
                Found in assets/js/jqueryui.min.js - About 1 hr to fix

                  Function buildImage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              buildImage: function (imageData, isSync) {
                                  var gallery = this;
                                  var nextIndex = this.getNextIndex(imageData.index);
                  
                                  // Construct new hidden span for the image
                  Severity: Minor
                  Found in assets/js/jquery.galleriffic.js - About 1 hr to fix

                    Function _mouseCapture has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        _mouseCapture: function(event, overrideHandle) {
                            var currentItem = null,
                                validHandle = false,
                                that = this;
                    
                    
                    Severity: Minor
                    Found in assets/js/jqueryui.min.js - About 1 hr to fix

                      Function scale has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          loadImage.scale = function (img, options) {
                              options = options || {};
                              var canvas = document.createElement('canvas'),
                                  width = img.width,
                                  height = img.height,
                      Severity: Minor
                      Found in assets/js/uploader/load-image.js - About 1 hr to fix

                        Function cancel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            cancel: function() {
                        
                                if(this.dragging) {
                        
                                    this._mouseUp({ target: null });
                        Severity: Minor
                        Found in assets/js/jqueryui.min.js - About 1 hr to fix

                          Function _createTitlebar has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _createTitlebar: function() {
                                  var uiDialogTitle;
                          
                                  this.uiDialogTitlebar = $( "<div>" )
                                      .addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
                          Severity: Minor
                          Found in assets/js/jqueryui.min.js - About 1 hr to fix

                            Function _dialogDatepicker has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                                    var id, browserWidth, browserHeight, scrollX, scrollY,
                                        inst = this._dialogInst; // internal instance
                            
                                    if (!inst) {
                            Severity: Minor
                            Found in assets/js/jqueryui.min.js - About 1 hr to fix

                              Function _mouseStart has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _mouseStart: function(event) {
                              
                                      var o = this.options;
                              
                                      //Create and append the visible helper
                              Severity: Minor
                              Found in assets/js/jqueryui.min.js - About 1 hr to fix

                                Function _resetButton has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _resetButton: function() {
                                        if ( this.type === "input" ) {
                                            if ( this.options.label ) {
                                                this.element.val( this.options.label );
                                            }
                                Severity: Minor
                                Found in assets/js/jqueryui.min.js - About 1 hr to fix

                                  Function pulsate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  var effectPulsate = $.effects.effect.pulsate = function( o, done ) {
                                      var elem = $( this ),
                                          mode = $.effects.setMode( elem, o.mode || "show" ),
                                          show = mode === "show",
                                          hide = mode === "hide",
                                  Severity: Minor
                                  Found in assets/js/jqueryui.min.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language