XoopsModules25x/smallworld

View on GitHub

Showing 759 of 1,838 total issues

Function _updateCountdown has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _updateCountdown: function (target, inst) {
            var $target = $(target);
            inst = inst || $target.data(this.propertyName);
            if (!inst) {
                return;
Severity: Minor
Found in assets/js/jquery.countdown.js - About 1 hr to fix

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

                    send: function (_, completeCallback) {
                        var message = {
                                id: 'postmessage-transport-' + (counter += 1)
                            },
                            eventName = 'message.' + message.id;
    Severity: Minor
    Found in assets/js/cors/jquery.postmessage-transport.js - About 1 hr to fix

      Function success has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      success: function (data) {
                          var result;
      
                          if (embedProvider.yql.xpath && embedProvider.yql.xpath == '//meta|//title|//link') {
                              var meta = {};
      Severity: Minor
      Found in assets/js/jquery.oembed.js - About 1 hr to fix

        Function val has 40 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            val: function( value ) {
                var hooks, ret, isFunction,
                    elem = this[0];
        
                if ( !arguments.length ) {
        Severity: Minor
        Found in assets/js/jquery.min.js - About 1 hr to fix

          Function destroy has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  destroy: function () {
                      var o = this.options;
          
                      this.abort();
          
          
          Severity: Minor
          Found in assets/js/jquery-ui-1.8.11.custom.js - About 1 hr to fix

            Function _mouseDown has 40 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _mouseDown: function (event) {
                        // don't let more than one widget handle mouseStart
                        // TODO: figure out why we have to use originalEvent
                        event.originalEvent = event.originalEvent || {};
                        if (event.originalEvent.mouseHandled) {
            Severity: Minor
            Found in assets/js/jquery-ui-1.8.11.custom.js - About 1 hr to fix

              Function _setOption has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      _setOption: function (key, value) {
                          var i,
                              valsLength = 0;
              
                          if ($.isArray(this.options.values)) {
              Severity: Minor
              Found in assets/js/jquery-ui-1.8.11.custom.js - About 1 hr to fix

                Function smallworld_GetModuleOption has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                function smallworld_GetModuleOption($option = null, $repmodule = 'smallworld', $flushFirst = false)
                {
                    static $modOptions = [];
                    if ($flushFirst) { // clears the 'cache', forces reload of configs
                        $modOptions = [];
                Severity: Minor
                Found in include/functions.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 resizeAndCrop has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function resizeAndCrop()
                    {
                        // 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 _respectSize has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _respectSize: function( data ) {
                
                        var o = this._vBoundaries,
                            a = this.axis,
                            ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),
                Severity: Minor
                Found in assets/js/jqueryui.min.js - About 1 hr to fix

                  Function _optionDatepicker has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _optionDatepicker: function(target, name, value) {
                          var settings, date, minDate, maxDate,
                              inst = this._getInst(target);
                  
                          if (arguments.length === 2 && typeof name === "string") {
                  Severity: Minor
                  Found in assets/js/jqueryui.min.js - About 1 hr to fix

                    Function slide has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            , slide: function (type, next) {
                                var $active = this.$element.find('.item.active')
                                    , $next = next || $active[type]()
                                    , isCycling = this.interval
                                    , direction = type == 'next' ? 'left' : 'right'
                    Severity: Minor
                    Found in assets/js/uploader/bootstrap.js - About 1 hr to fix

                      Function intersect has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      $.ui.intersect = (function() {
                          function isOverAxis( x, reference, size ) {
                              return ( x >= reference ) && ( x < ( reference + size ) );
                          }
                      
                      
                      Severity: Minor
                      Found in assets/js/jqueryui.min.js - About 1 hr to fix

                        Function close has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            close: function( event ) {
                                var tooltip,
                                    that = this,
                                    target = $( event ? event.currentTarget : this.element ),
                                    tooltipData = this._find( target );
                        Severity: Minor
                        Found in assets/js/jqueryui.min.js - About 1 hr to fix

                          Function addCombinator has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function addCombinator( matcher, combinator, base ) {
                              var dir = combinator.dir,
                                  checkNonElements = base && dir === "parentNode",
                                  doneName = done++;
                          
                          
                          Severity: Minor
                          Found in assets/js/jquery.min.js - About 1 hr to fix

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

                                    send: function (data) {
                                        if (data && !this.options.disabled) {
                                            if (data.fileInput && !data.files) {
                                                var that = this,
                                                    dfd = $.Deferred(),
                            Severity: Minor
                            Found in assets/js/jquery.fileupload.js - About 1 hr to fix

                              Function offsetString has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          var offsetString = function (offset) { // e.g. '+2d', '-4w', '+3h +30m'
                                              offset = offset.toLowerCase();
                                              var time = new Date();
                                              var year = time.getFullYear();
                                              var month = time.getMonth();
                              Severity: Minor
                              Found in assets/js/jquery.countdown.js - About 1 hr to fix

                                Function computeStyleTests has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function computeStyleTests() {
                                        // Minified: var b,c,d,j
                                        var div, body, container, contents;
                                
                                        body = document.getElementsByTagName( "body" )[ 0 ];
                                Severity: Minor
                                Found in assets/js/jquery.min.js - About 1 hr to fix

                                  Function _on has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      _on: function( suppressDisabledCheck, element, handlers ) {
                                          var delegateElement,
                                              instance = this;
                                  
                                          // no suppressDisabledCheck flag, shuffle arguments
                                  Severity: Minor
                                  Found in assets/js/jqueryui.min.js - About 1 hr to fix

                                    Function _createPlaceholder has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        _createPlaceholder: function(that) {
                                            that = that || this;
                                            var className,
                                                o = that.options;
                                    
                                    
                                    Severity: Minor
                                    Found in assets/js/jqueryui.min.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language