XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Function toggleClass has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    toggleClass: function( value, stateVal ) {
        var type = typeof value;

        if ( typeof stateVal === "boolean" && type === "string" ) {
            return stateVal ? this.addClass( value ) : this.removeClass( value );
Severity: Minor
Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

    Function ajaxHandleResponses has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function ajaxHandleResponses( s, jqXHR, responses ) {
        var firstDataType, ct, finalDataType, type,
            contents = s.contents,
            dataTypes = s.dataTypes;
    
    
    Severity: Minor
    Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

      Function style has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          style: function( elem, name, value, extra ) {
      
              // Don't set styles on text and comment nodes
              if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                  return;
      Severity: Minor
      Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

        Method _getCodeSet has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function _getCodeSet()
            {
                $buffer = $this->_get_Win32_OperatingSystem();
                if (!$buffer) {
                    if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage\\ACP", $strBuf, false)) {
        Severity: Minor
        Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 hr to fix

          Method execute has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function execute()
              {
                  if (empty($this->_filecontent)) {
                      return;
                  }
          Severity: Minor
          Found in phpsysinfo/plugins/ps/class.ps.inc.php - About 1 hr to fix

            Method _xmlbody has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function _xmlbody()
                {
                    $dom = new DOMDocument('1.0', 'UTF-8');
                    $root = $dom->createElement("tns:phpsysinfo");
                    $root->setAttribute('xmlns:tns', 'http://phpsysinfo.sourceforge.net/');
            Severity: Minor
            Found in phpsysinfo/includes/xml/class.XML.inc.php - About 1 hr to fix

              Method get_mimetypes has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
                      $ret = array();
                      $criteria = new CriteriaCompo();
              
                      if ( is_object($OtherCriteria) ) {
              Severity: Minor
              Found in kernel/mimetypes.php - About 1 hr to fix

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

                    clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                        var destElements, node, clone, i, srcElements,
                            inPage = jQuery.contains( elem.ownerDocument, elem );
                
                        if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||
                Severity: Minor
                Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

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

                      dispatch: function( event ) {
                  
                          // Make a writable jQuery.Event from the native event object
                          event = jQuery.event.fix( event );
                  
                  
                  Severity: Minor
                  Found in phpsysinfo/js/jQuery/jquery.js - About 1 hr to fix

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

                        replaceCSS: function (cssText) {
                            if (cssText) {
                                // Replace all properties containing REM units with their pixel equivalents.
                                return cssText.replace(
                                    /([\d]+\.[\d]+|\.[\d]+|[\d]+)rem/g, function (fullMatch, groupMatch) {
                    Severity: Minor
                    Found in phpsysinfo/js/vendor/bootstrap-ie8.js - About 1 hr to fix

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

                          _proto._showElement = function _showElement(relatedTarget) {
                            var _this3 = this;
                      
                            var transition = $(this._element).hasClass(ClassName.FADE);
                      
                      
                      Severity: Minor
                      Found in phpsysinfo/js/vendor/bootstrap-modal.js - About 1 hr to fix

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

                            private function _cpuinfo()
                            {
                                if (CommonFunctions::rfts('/proc/cpuinfo', $bufr)) {
                                    $processors = preg_split('/\s?\n\s?\n/', trim($bufr));
                                    foreach ($processors as $processor) {
                        Severity: Minor
                        Found in phpsysinfo/includes/os/class.HPUX.inc.php - About 1 hr to fix

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

                              protected function pciconf()
                              {
                                  $arrResults = array();
                                  $intS = 0;
                                  if (CommonFunctions::executeProgram("pciconf", "-lv", $strBuf, PSI_DEBUG)) {
                          Severity: Minor
                          Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 1 hr to fix

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

                                private function _buildXml()
                                {
                                    if (!$this->_plugin_request || $this->_complete_request) {
                                        if ($this->_sys === null) {
                                            if (PSI_DEBUG === true) {
                            Severity: Minor
                            Found in phpsysinfo/includes/xml/class.XML.inc.php - About 1 hr to fix

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

                                  private function _toUTF8($str)
                                  {
                                      $str = trim(preg_replace('/[\x00-\x09\x0b-\x1F]/', ' ', $str)); //remove nonprintable characters
                                      if ($this->_encoding != null) {
                                          if (strcasecmp($this->_encoding, "UTF-8") == 0) {
                              Severity: Minor
                              Found in phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php - About 1 hr to fix

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

                                    private function _filesystems()
                                    {
                                        if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                            $df = preg_replace('/\n\s/m', ' ', $df);
                                            $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
                                Severity: Minor
                                Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 1 hr to fix

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

                                  function renderCurrent(data) {
                                      if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
                                          $("#block_current").remove();
                                          return;
                                      }
                                  Severity: Minor
                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.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 renderVoltage has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function renderVoltage(data) {
                                      if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
                                          $("#block_voltage").remove();
                                          return;
                                      }
                                  Severity: Minor
                                  Found in phpsysinfo/js/phpSysInfo/phpsysinfo_bootstrap.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 ps_buildTable has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  function ps_buildTable(xml) {
                                      var html = "", tree = [], closed = [], memwas = false, cpuwas = false;
                                  
                                      $("#Plugin_PS #Plugin_PSTable").remove();
                                  
                                  
                                  Severity: Minor
                                  Found in phpsysinfo/plugins/ps/js/ps.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 _power has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      private function _power()
                                      {
                                          foreach ($this->_buf as $sensor) {
                                              if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Current'))
                                                  ||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Current')))
                                  Severity: Minor
                                  Found in phpsysinfo/includes/mb/class.ipmitool.inc.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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language