XoopsModules25x/xoopsinfo

View on GitHub

Showing 1,065 of 16,781 total issues

Function reload has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function reload(initiate) {
    $.ajax({
        url: 'xml.php',
        dataType: 'xml',
        error: function error() {
Severity: Minor
Found in phpsysinfo/js/phpSysInfo/phpsysinfo.js - About 1 hr to fix

    Function renderCurrent has 44 lines of code (exceeds 25 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

      Function renderVoltage has 44 lines of code (exceeds 25 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

        Function _fnGetObjectDataFn has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                function _fnGetObjectDataFn( mSource )
                {
                    if ( mSource === null )
                    {
                        /* Give an empty string for rendering / sorting etc */
        Severity: Minor
        Found in phpsysinfo/js/jQuery/jquery.dataTables.js - About 1 hr to fix

          Function renderPlugin_quotas has 44 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function renderPlugin_quotas(data) {
          
              var directives = {
          
                  ByteUsed: {
          Severity: Minor
          Found in phpsysinfo/plugins/quotas/js/quotas_bootstrap.js - About 1 hr to fix

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

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

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

                  public function execute()
                  {
                      switch (strtolower(PSI_PLUGIN_HYPERV_ACCESS)) {
                      case 'command':
                          if (PSI_OS == 'WINNT') {
              Severity: Minor
              Found in phpsysinfo/plugins/hyperv/class.hyperv.inc.php - About 1 hr to fix

                Method edit_mimetypes_modules has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function edit_mimetypes_modules()
                {
                    global $status, $mid, $start;
                
                    $mime_id = isset($_REQUEST['mime_id']) ? (int)$_REQUEST['mime_id'] : 0;
                Severity: Minor
                Found in modules/xoopsinfo/include/mimetypes.php - About 1 hr to fix

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

                  },{"../lib/lodash.js":7,"./attributeFactory":2,"./helpers":5}],5:[function(require,module,exports){
                  var ElementFactory, expando, html5Clone, _getElements;
                  
                  ElementFactory = require('./elementFactory');
                  
                  
                  Severity: Minor
                  Found in phpsysinfo/js/vendor/transparency.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 snmppinfo_buildTable has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function snmppinfo_buildTable(xml) {
                      var html = "", tree = [], closed = [];
                  
                      $("#Plugin_SNMPPInfo #Plugin_SNMPPInfoTable").remove();
                  
                  
                  Severity: Minor
                  Found in phpsysinfo/plugins/snmppinfo/js/snmppinfo.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 _other has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function _other()
                      {
                          foreach ($this->_lines as $line) {
                              $buffer = preg_split("/\s*\|\s*/", $line);
                              if (isset($buffer[1]) && $buffer[1] == "Compact"
                  Severity: Minor
                  Found in phpsysinfo/includes/mb/class.ipmiutil.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

                  Function _bootStrap has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function _bootStrap($packed, $keywords)
                      {
                          $ENCODE = $this->_safeRegExp('$encode\\($count\\)');
                  
                          // $packed: the packed script
                  Severity: Minor
                  Found in phpsysinfo/includes/js/class.JavaScriptPacker.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

                  Function _xmlbody has a Cognitive Complexity of 14 (exceeds 5 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

                  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 _info has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                     private function _info()
                      {
                          if (empty($this->_output)) {
                              return;
                          }
                  Severity: Minor
                  Found in phpsysinfo/includes/ups/class.pmset.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

                  Function readenv has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static function readenv($strElem, &$strBuffer)
                      {
                          $strBuffer = '';
                          if (PSI_OS == 'WINNT') { //case insensitive
                              if (isset($_SERVER)) {
                  Severity: Minor
                  Found in phpsysinfo/includes/class.CommonFunctions.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

                  Function list_mimetypes_perms has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function list_mimetypes_perms()
                  {
                      global $xoopsModule, $uri, $status, $mid, $start, $type;
                  
                      $mimetypes_Handler = xoops_getHandler('mimetypes_perms');
                  Severity: Minor
                  Found in modules/xoopsinfo/include/mimetypes.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 execute has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function execute()
                      {
                          if (defined('PSI_PLUGIN_PSSTATUS_PROCESSES') && is_string(PSI_PLUGIN_PSSTATUS_PROCESSES)) {
                              if (preg_match(ARRAY_EXP, PSI_PLUGIN_PSSTATUS_PROCESSES)) {
                                  $processes = eval(PSI_PLUGIN_PSSTATUS_PROCESSES);
                  Severity: Minor
                  Found in phpsysinfo/plugins/psstatus/class.psstatus.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

                  Function xml has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function xml()
                      {
                          foreach ($this->_result as $disk_items) {
                              if (isset($disk_items['Name']) && (trim($disk_items['Name']) !== '')) {
                                  $xmlstablebit_disk = $this->xml->addChild("Disk");
                  Severity: Minor
                  Found in phpsysinfo/plugins/stablebit/class.stablebit.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

                  Function get_mimetypes has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                  Open

                      function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
                          $ret = array();
                          $criteria = new CriteriaCompo();
                          if ( is_object($OtherCriteria) ) {
                              $criteria->add($OtherCriteria, 'AND');
                  Severity: Minor
                  Found in kernel/mimetypes.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 get_mimetypes has a Cognitive Complexity of 14 (exceeds 5 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

                  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