XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Avoid deeply nested control flow statements.
Open

                    if (bytes > Math.pow(1024, 2)) {
                        show += round(bytes / Math.pow(1024, 2), 2);
                        show += " " + genlang(88);
                    } else {
                        if (bytes > Math.pow(1024, 1)) {
Severity: Major
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 45 mins to fix

    Function init has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        init: function( elem, options, prop, end, easing, unit ) {
    Severity: Minor
    Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

      Function getLanguage has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function getLanguage(plugin, langarrId) {
          var getLangUrl = "";
          if (current_language) {
              getLangUrl = 'language/language.php?lang=' + current_language;
              if (plugin) {
      Severity: Minor
      Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.js - About 45 mins 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

      Avoid deeply nested control flow statements.
      Open

                          if ( nodeType === 9 ) {
                              if ( (elem = context.getElementById( m )) ) {
      
                                  // Support: IE, Opera, Webkit
                                  // TODO: identify versions
      Severity: Major
      Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if ( nid === expando ) {
                                    context.removeAttribute( "id" );
                                }
        Severity: Major
        Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
                                      cur += clazz + " ";
                                  }
          Severity: Major
          Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            } else if ( copy !== undefined ) {
                                target[ name ] = copy;
                            }
            Severity: Major
            Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ( xhr.readyState !== 4 ) {
                                                  xhr.abort();
                                              }
              Severity: Major
              Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if ( sNodeName == "TD" || sNodeName == "TH" )
                                            {
                                                _fnSetCellData( oSettings, iThisIndex, jInner, $.trim(nTds[j].innerHTML) );
                                                jInner++;
                                            }
                Severity: Major
                Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      while ( i-- ) {
                                          groups[i] = nidselect + " " + toSelector( groups[i] );
                                      }
                  Severity: Major
                  Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if ( (elem = matcherOut[i]) ) {
                                                // Restore matcherIn since elem is not yet a final match
                                                temp.push( (matcherIn[i] = elem) );
                                            }
                    Severity: Major
                    Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                          if ( Expr.relative[ tokens[j].type ] ) {
                                              break;
                                          }
                      Severity: Major
                      Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if ( !selector ) {
                                                push.apply( results, seed );
                                                return results;
                                            }
                        Severity: Major
                        Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ( ( event.result = ret ) === false ) {
                                                      event.preventDefault();
                                                      event.stopPropagation();
                                                  }
                          Severity: Major
                          Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    if ( !attributes && typeof elem.removeAttribute !== "undefined" ) {
                                                        elem.removeAttribute( internalKey );
                            
                                                    // Webkit & Blink performance suffers when deleting properties
                                                    // from DOM nodes, so set to undefined instead
                            Severity: Major
                            Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if ( sValType !== '' )
                                                          {
                                                              sThisType = _fnDetectType( sValType );
                                                              if ( oSettings.aoColumns[iColumn].sType === null )
                                                              {
                              Severity: Major
                              Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                            for ( k=0 ; k<iRowspan ; k++ )
                                                            {
                                                                aLayout[i+k][iColShifted+l] = {
                                                                    "cell": nCell,
                                                                    "unique": iColspan == 1 ? true : false
                                Severity: Major
                                Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              while( oSettings.aoColumns.length <= aTargets[j] )
                                                              {
                                                                  _fnAddColumn( oSettings );
                                                              }
                                  Severity: Major
                                  Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if ( elem.id !== match[ 2 ] ) {
                                                                return rootjQuery.find( selector );
                                                            }
                                    Severity: Major
                                    Found in phpsysinfo/js/jQuery/jquery.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if ( oSettings.aoColumns[iColumn].bUseRendered )
                                                                  {
                                                                      /* Use the rendered data for filtering/sorting */
                                                                      _fnSetCellData( oSettings, iRow, iColumn, sRendered );
                                                                  }
                                      Severity: Major
                                      Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language