XoopsModules25x/xoopsinfo

View on GitHub
phpsysinfo/includes/os/class.WINNT.inc.php

Summary

Maintainability
F
2 wks
Test Coverage

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

    private function _network()
    {
        if ($this->_wmi) {
            $buffer = $this->_get_Win32_OperatingSystem();
            if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8
Severity: Minor
Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 5 days 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

File class.WINNT.inc.php has 739 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * WINNT System Class
 *
 * PHP version 5
Severity: Major
Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 day to fix

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

        private function _devicelist($strType)
        {
            if (empty($this->_wmidevices)) {
                if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                    $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));
    Severity: Minor
    Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 day 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 _cpuinfo has a Cognitive Complexity of 62 (exceeds 5 allowed). Consider refactoring.
    Open

        private function _cpuinfo()
        {
            $allCpus = $this->_get_Win32_Processor();
            if (!$allCpus) {
                $hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";
    Severity: Minor
    Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 day 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

    Method _network has 149 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function _network()
        {
            if ($this->_wmi) {
                $buffer = $this->_get_Win32_OperatingSystem();
                if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8
    Severity: Major
    Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 5 hrs to fix

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

          private function _distro()
          {
              $buffer = $this->_get_Win32_OperatingSystem();
              if ($buffer) {
                  $ver = $buffer[0]['Version'];
      Severity: Minor
      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 5 hrs 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 _hostname has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          private function _hostname()
          {
              if (PSI_USE_VHOST === true) {
                  if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
              } else {
      Severity: Minor
      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 4 hrs 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 _filesystems has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          private function _filesystems()
          {
              $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
              $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
              $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));
      Severity: Minor
      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 4 hrs 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 _getCodeSet has a Cognitive Complexity of 27 (exceeds 5 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 3 hrs 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

      The class WINNT has an overall complexity of 304 which is very high. The configured complexity threshold is 50.
      Open

      class WINNT extends OS
      {
          /**
           * holds the data from WMI Win32_OperatingSystem
           *

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

          private function _hardware()
          {
              foreach ($this->_devicelist('PCI') as $pciDev) {
                  $dev = new HWDevice();
                  $dev->setName($pciDev['Name']);
      Severity: Minor
      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 3 hrs 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

      WINNT has 23 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class WINNT extends OS
      {
          /**
           * holds the data from WMI Win32_OperatingSystem
           *
      Severity: Minor
      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs to fix

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

            private function _cpuinfo()
            {
                $allCpus = $this->_get_Win32_Processor();
                if (!$allCpus) {
                    $hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";
        Severity: Major
        Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs to fix

          Method _distro has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function _distro()
              {
                  $buffer = $this->_get_Win32_OperatingSystem();
                  if ($buffer) {
                      $ver = $buffer[0]['Version'];
          Severity: Major
          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                                if ((version_compare("10.0.0.0", $ip, "<=") && version_compare($ip, "10.255.255.255", "<=")) ||
                                    (version_compare("172.16.0.0", $ip, "<=") && version_compare($ip, "172.31.255.255", "<=")) ||
                                    (version_compare("192.168.0.0", $ip, "<=") && version_compare($ip, "192.168.255.255", "<=")) ||
                                    (version_compare("127.0.0.0", $ip, "<=") && version_compare($ip, "127.255.255.255", "<=")) ||
                                    (version_compare("169.254.1.0", $ip, "<=") && version_compare($ip, "169.254.254.255", "<=")) ||
            Severity: Critical
            Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs to fix

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

                  private function _loadavg()
                  {
                      if (($cpubuffer = $this->_get_Win32_PerfFormattedData_PerfOS_Processor()) && isset($cpubuffer['cpu_Total'])) {
                          $this->sys->setLoad($cpubuffer['cpu_Total']);
                          if (PSI_LOAD_BAR) {
              Severity: Minor
              Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs 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_Win32_PerfFormattedData_PerfOS_Processor has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function _get_Win32_PerfFormattedData_PerfOS_Processor()
                  {
                      if ($this->_Win32_PerfFormattedData_PerfOS_Processor === null) {
                          $this->_Win32_PerfFormattedData_PerfOS_Processor = array();
                          $buffer = $this->_get_Win32_OperatingSystem();
              Severity: Minor
              Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs 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

              Method _devicelist has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function _devicelist($strType)
                  {
                      if (empty($this->_wmidevices)) {
                          if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                              $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));
              Severity: Major
              Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 2 hrs to fix

                Method _hardware has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function _hardware()
                    {
                        foreach ($this->_devicelist('PCI') as $pciDev) {
                            $dev = new HWDevice();
                            $dev->setName($pciDev['Name']);
                Severity: Minor
                Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 hr to fix

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

                      private function _filesystems()
                      {
                          $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                          $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                          $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));
                  Severity: Minor
                  Found in phpsysinfo/includes/os/class.WINNT.inc.php - 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 _uptime has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function _uptime()
                          {
                              $result = 0;
                              date_default_timezone_set('UTC');
                              $buffer = $this->_get_Win32_OperatingSystem();
                      Severity: Minor
                      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 hr to fix

                        Method _hostname has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function _hostname()
                            {
                                if (PSI_USE_VHOST === true) {
                                    if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
                                } else {
                        Severity: Minor
                        Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                              if ((($kernel[1] == '.') && ($kernel[0] <5)) || (substr($kernel, 0, 4) == '5.0.'))
                                                  $icon = 'Win2000.png';
                                              elseif ((substr($kernel, 0, 4) == '6.0.') || (substr($kernel, 0, 4) == '6.1.'))
                                                  $icon = 'WinVista.png';
                                              elseif ((substr($kernel, 0, 4) == '6.2.') || (substr($kernel, 0, 4) == '6.3.') || (substr($kernel, 0, 4) == '6.4.') || (substr($kernel, 0, 5) == '10.0.'))
                          Severity: Major
                          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 1 hr to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if ($ali[$name]['id']==$NetworkAdapterConfiguration['SettingID']) {
                                                            $mininame = $ali[$name]['name'];
                                                            if (preg_match('/^isatap\.({[A-Fa-f0-9\-]*})/', $mininame))
                                                                $mininame="Microsoft ISATAP Adapter";
                                                            elseif (preg_match('/\s-\s([^-]*)$/', $mininame, $ar_name))
                            Severity: Major
                            Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (defined('PSI_SHOW_NETWORK_INFOS') && PSI_SHOW_NETWORK_INFOS) {
                                                          if (($speedinfo = $device['CurrentBandwidth']) >= 1000000) {
                                                              if ($speedinfo > 1000000000) {
                                                                  $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').round($speedinfo/1000000000, 2)."Gb/s");
                                                              } else {
                              Severity: Major
                              Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                        if (($txbytes < 0) && ($rxbytes < 0)) {
                                                            $txbytes += 4294967296;
                                                            $rxbytes += 4294967296;
                                                        } elseif ($txbytes < 0) {
                                                            if ($device['BytesTotalPersec'] > $rxbytes)
                                Severity: Major
                                Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

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

                                      protected function _users()
                                      {
                                          if (CommonFunctions::executeProgram('quser', '', $strBuf, false) && (strlen($strBuf) > 0)) {
                                                  $lines = preg_split('/\n/', $strBuf);
                                                  $users = count($lines)-1;
                                  Severity: Minor
                                  Found in phpsysinfo/includes/os/class.WINNT.inc.php - 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 (preg_match('/\n(\d+)\n(\d+)\n(\d+)$/', $values, $out_dig)) {
                                                          $size = $out_dig[1];
                                                          $used = $out_dig[2];
                                                          $free = $out_dig[3];
                                                          if ($used + $free == $size) {
                                  Severity: Major
                                  Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

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

                                        private function _machine()
                                        {
                                            $buffer = $this->_get_Win32_ComputerSystem();
                                            if ($buffer) {
                                                $buf = "";
                                    Severity: Minor
                                    Found in phpsysinfo/includes/os/class.WINNT.inc.php - 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 (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\".$strInstanceID."\\FriendlyName", $strName, false)) {
                                                                    $cname = str_replace(array('(', ')', '#'), array('[', ']', '_'), $strName); //convert to canonical
                                                                    if (!isset($aliases[$cname])) { // duplicate checking
                                                                        $aliases[$cname]['id'] = $netID;
                                                                        $aliases[$cname]['name'] = $strName;
                                    Severity: Major
                                    Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 45 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                                          if ($macexist
                                      //                        || ($device['CurrentBandwidth'] >= 1000000)
                                                              || ($device['BytesTotalPersec'] != 0)
                                                              || ($device['BytesSentPersec'] != 0)
                                                              || ($device['BytesReceivedPersec'] != 0)
                                      Severity: Major
                                      Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                                            if (((($ali=$aliases) && isset($ali[$name])) || (($ali=$aliases2) && isset($ali[$name]))) && isset($ali[$name]['id']) && ($ali[$name]['id'] !== "")) {
                                                                foreach ($allNetworkAdapterConfigurations as $NetworkAdapterConfiguration) {
                                                                    if ($ali[$name]['id']==$NetworkAdapterConfiguration['SettingID']) {
                                                                        $mininame = $ali[$name]['name'];
                                                                        if (preg_match('/^isatap\.({[A-Fa-f0-9\-]*})/', $mininame))
                                        Severity: Major
                                        Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 40 mins to fix

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

                                              private function _memory()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer) {
                                          Severity: Minor
                                          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 35 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

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

                                              public function build()
                                              {
                                                  $this->_distro(); //share getDistribution()
                                                  if ($this->sys->getDistribution()=="ReactOS") {
                                                      $this->error->addError("WARN", "The ReactOS version of phpSysInfo is a work in progress, some things currently don't work");
                                          Severity: Minor
                                          Found in phpsysinfo/includes/os/class.WINNT.inc.php - About 35 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

                                          The method _network() has an NPath complexity of 17424507. The configured NPath complexity threshold is 200.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          NPathComplexity

                                          Since: 0.1

                                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                          Example

                                          class Foo {
                                              function bar() {
                                                  // lots of complicated code
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                          The method _network() has 165 lines of code. Current threshold is set to 100. Avoid really long methods.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          The method _getCodeSet() has an NPath complexity of 260. The configured NPath complexity threshold is 200.
                                          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)) {

                                          NPathComplexity

                                          Since: 0.1

                                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                          Example

                                          class Foo {
                                              function bar() {
                                                  // lots of complicated code
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                          The method _cpuinfo() has an NPath complexity of 161520. The configured NPath complexity threshold is 200.
                                          Open

                                              private function _cpuinfo()
                                              {
                                                  $allCpus = $this->_get_Win32_Processor();
                                                  if (!$allCpus) {
                                                      $hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";

                                          NPathComplexity

                                          Since: 0.1

                                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                          Example

                                          class Foo {
                                              function bar() {
                                                  // lots of complicated code
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                          The method _hardware() has an NPath complexity of 864. The configured NPath complexity threshold is 200.
                                          Open

                                              private function _hardware()
                                              {
                                                  foreach ($this->_devicelist('PCI') as $pciDev) {
                                                      $dev = new HWDevice();
                                                      $dev->setName($pciDev['Name']);

                                          NPathComplexity

                                          Since: 0.1

                                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                          Example

                                          class Foo {
                                              function bar() {
                                                  // lots of complicated code
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                          The method _devicelist() has an NPath complexity of 2904. The configured NPath complexity threshold is 200.
                                          Open

                                              private function _devicelist($strType)
                                              {
                                                  if (empty($this->_wmidevices)) {
                                                      if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));

                                          NPathComplexity

                                          Since: 0.1

                                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                          Example

                                          class Foo {
                                              function bar() {
                                                  // lots of complicated code
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                          The method build() has an NPath complexity of 486. The configured NPath complexity threshold is 200.
                                          Open

                                              public function build()
                                              {
                                                  $this->_distro(); //share getDistribution()
                                                  if ($this->sys->getDistribution()=="ReactOS") {
                                                      $this->error->addError("WARN", "The ReactOS version of phpSysInfo is a work in progress, some things currently don't work");

                                          NPathComplexity

                                          Since: 0.1

                                          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                          Example

                                          class Foo {
                                              function bar() {
                                                  // lots of complicated code
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                          The method _get_Win32_PerfFormattedData_PerfOS_Processor() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _get_Win32_PerfFormattedData_PerfOS_Processor()
                                              {
                                                  if ($this->_Win32_PerfFormattedData_PerfOS_Processor === null) {
                                                      $this->_Win32_PerfFormattedData_PerfOS_Processor = array();
                                                      $buffer = $this->_get_Win32_OperatingSystem();

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _devicelist() has a Cyclomatic Complexity of 28. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _devicelist($strType)
                                              {
                                                  if (empty($this->_wmidevices)) {
                                                      if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _cpuinfo() has a Cyclomatic Complexity of 30. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _cpuinfo()
                                              {
                                                  $allCpus = $this->_get_Win32_Processor();
                                                  if (!$allCpus) {
                                                      $hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _hostname() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _hostname()
                                              {
                                                  if (PSI_USE_VHOST === true) {
                                                      if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
                                                  } else {

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _network() has a Cyclomatic Complexity of 77. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _distro() has a Cyclomatic Complexity of 27. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _hardware() has a Cyclomatic Complexity of 19. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _hardware()
                                              {
                                                  foreach ($this->_devicelist('PCI') as $pciDev) {
                                                      $dev = new HWDevice();
                                                      $dev->setName($pciDev['Name']);

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _getCodeSet() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.
                                          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)) {

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method build() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              public function build()
                                              {
                                                  $this->_distro(); //share getDistribution()
                                                  if ($this->sys->getDistribution()=="ReactOS") {
                                                      $this->error->addError("WARN", "The ReactOS version of phpSysInfo is a work in progress, some things currently don't work");

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          The method _filesystems() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CyclomaticComplexity

                                          Since: 0.1

                                          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

                                          Example

                                          // Cyclomatic Complexity = 11
                                          class Foo {
                                          1   public function example() {
                                          2       if ($a == $b) {
                                          3           if ($a1 == $b1) {
                                                          fiddle();
                                          4           } elseif ($a2 == $b2) {
                                                          fiddle();
                                                      } else {
                                                          fiddle();
                                                      }
                                          5       } elseif ($c == $d) {
                                          6           while ($c == $d) {
                                                          fiddle();
                                                      }
                                          7        } elseif ($e == $f) {
                                          8           for ($n = 0; $n < $h; $n++) {
                                                          fiddle();
                                                      }
                                                  } else {
                                                      switch ($z) {
                                          9               case 1:
                                                              fiddle();
                                                              break;
                                          10              case 2:
                                                              fiddle();
                                                              break;
                                          11              case 3:
                                                              fiddle();
                                                              break;
                                                          default:
                                                              fiddle();
                                                              break;
                                                      }
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                          $buffer[0]['CodeSet'] = $strBuf;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$hnm' which will lead to PHP notices.
                                          Open

                                                      if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\~MHz", $strBuf, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strCName' which will lead to PHP notices.
                                          Open

                                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$netID."\\Connection\\Name", $strCName, false)

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$hnm' which will lead to PHP notices.
                                          Open

                                                      if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                  if (CommonFunctions::executeProgram('quser', '', $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                  if (CommonFunctions::executeProgram('quser', '', $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strInstanceID' which will lead to PHP notices.
                                          Open

                                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\".$strInstanceID."\\FriendlyName", $strName, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                                  if (preg_match("/^0x([0-9a-f]+)$/i", $strBuf, $hexvalue)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strName' which will lead to PHP notices.
                                          Open

                                                                          $cname = str_replace(array('(', ')', '#'), array('[', ']', '_'), $strName); //convert to canonical

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\VendorIdentifier", $strBuf, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage\\ACP", $strBuf, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$ver_value' which will lead to PHP notices.
                                          Open

                                                  } elseif (CommonFunctions::executeProgram('cmd', '/c ver 2>nul', $ver_value, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strName' which will lead to PHP notices.
                                          Open

                                                                              $aliases[$cname]['name'] = $strName;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                                      $this->sys->setDistribution("Microsoft ".$strBuf);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strName' which will lead to PHP notices.
                                          Open

                                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\".$strInstanceID."\\FriendlyName", $strName, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                  } elseif (($this->sys->getDistribution()=="ReactOS") && CommonFunctions::executeProgram('uptime', '', $strBuf, false) && (strlen($strBuf) > 0) && preg_match("/^System Up Time:\s+(\d+) days, (\d+) Hours, (\d+) Minutes, (\d+) Seconds/", $strBuf, $ar_buf)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                          $lines = preg_split('/\n/', $strBuf);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                                  $allCpus[$coreCount]['Manufacturer'] = $strBuf;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                      if (!$buffer && CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\ComputerName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                  } elseif (($this->sys->getDistribution()=="ReactOS") && CommonFunctions::executeProgram('uptime', '', $strBuf, false) && (strlen($strBuf) > 0) && preg_match("/^System Up Time:\s+(\d+) days, (\d+) Hours, (\d+) Minutes, (\d+) Seconds/", $strBuf, $ar_buf)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$ver_value' which will lead to PHP notices.
                                          Open

                                                          if (preg_match("/ReactOS\r?\nVersion\s+(.+)/", $ver_value, $ar_temp)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                                      $this->sys->setDistribution($strBuf);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                          $buffer[0]['Locale'] = $strBuf;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$hnm' which will lead to PHP notices.
                                          Open

                                                          if (CommonFunctions::readenv('COMPUTERNAME', $hnm)) $this->sys->setHostname($hnm);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strCName' which will lead to PHP notices.
                                          Open

                                                                                 && (str_replace(array('(', ')', '#'), array('[', ']', '_'), $strCName) !== $cname)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\Language\\Default", $strBuf, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                              $buffer[0]['Name'] = $strBuf;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$hnm' which will lead to PHP notices.
                                          Open

                                                          if (CommonFunctions::readenv('COMPUTERNAME', $hnm)) $this->sys->setHostname($hnm);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                      if (!$buffer && CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\ComputerName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                                  if (preg_match("/^Microsoft /", $strBuf)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\ProcessorNameString", $strBuf, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                                  $allCpus[$coreCount]['Name'] = $strBuf;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strInstanceID' which will lead to PHP notices.
                                          Open

                                                                  if (CommonFunctions::readReg($this->_reg, $hkey."\\".$netID."\\Connection\\PnPInstanceId", $strInstanceID, false)) { //a w Name jest net alias

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                  } elseif (($this->sys->getDistribution()=="ReactOS") && CommonFunctions::executeProgram('uptime', '', $strBuf, false) && (strlen($strBuf) > 0) && preg_match("/^System Up Time:\s+(\d+) days, (\d+) Hours, (\d+) Minutes, (\d+) Seconds/", $strBuf, $ar_buf)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$ver_value' which will lead to PHP notices.
                                          Open

                                                          } elseif (preg_match("/^(Microsoft [^\[]*)\s*\[\D*\s*(.+)\]/", $ver_value, $ar_temp)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                  if (CommonFunctions::executeProgram('qprocess', '*', $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$out_value' which will lead to PHP notices.
                                          Open

                                                      if (CommonFunctions::executeProgram('cmd', '/c free 2>nul', $out_value, true)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$processes' which will lead to PHP notices.
                                          Open

                                                      $processes['*'] = (count($lines)-1) - 3 ; //correction for process "qprocess *"

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$processes' which will lead to PHP notices.
                                          Open

                                                  $processes[' '] = $processes['*'];

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$out_value' which will lead to PHP notices.
                                          Open

                                                          for ($letter='A'; $letter!='AA'; $letter++) if (CommonFunctions::executeProgram('cmd', '/c free '.$letter.': 2>nul', $out_value, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                  if (CommonFunctions::executeProgram('qprocess', '*', $strBuf, false) && (strlen($strBuf) > 0)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$processes' which will lead to PHP notices.
                                          Open

                                                  $processes['*'] = 0;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strBuf' which will lead to PHP notices.
                                          Open

                                                      $lines = preg_split('/\n/', $strBuf);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strName' which will lead to PHP notices.
                                          Open

                                                                  if (CommonFunctions::readReg($this->_reg, $hkey."\\".$netCount."\\Description", $strName, false)

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strGUID' which will lead to PHP notices.
                                          Open

                                                                          $aliases2[$cname]['id'] = $strGUID;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strName' which will lead to PHP notices.
                                          Open

                                                                          $aliases2[$cname]['name'] = $strName;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$processes' which will lead to PHP notices.
                                          Open

                                                      $processes['*'] = count($buffer);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$processes' which will lead to PHP notices.
                                          Open

                                                  $processes[' '] = $processes['*'];

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strGUID' which will lead to PHP notices.
                                          Open

                                                                      && CommonFunctions::readReg($this->_reg, $hkey."\\".$netCount."\\ServiceName", $strGUID, false)) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strCName' which will lead to PHP notices.
                                          Open

                                                                                  $aliases[$cname]['netname'] = $strCName;

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$strName' which will lead to PHP notices.
                                          Open

                                                                      $cname = str_replace(array('(', ')', '#'), array('[', ']', '_'), $strName); //convert to canonical

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$processes' which will lead to PHP notices.
                                          Open

                                                  $this->sys->setProcesses($processes);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$processes' which will lead to PHP notices.
                                          Open

                                                  if ($processes['*'] <= 0) {

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          Avoid using undefined variables such as '$out_value' which will lead to PHP notices.
                                          Open

                                                              $values = preg_replace('/[^\d\n]/', '', $out_value);

                                          UndefinedVariable

                                          Since: 2.8.0

                                          Detects when a variable is used that has not been defined before.

                                          Example

                                          class Foo
                                          {
                                              private function bar()
                                              {
                                                  // $message is undefined
                                                  echo $message;
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

                                          The method __construct has a boolean flag argument $blockname, which is a certain sign of a Single Responsibility Principle violation.
                                          Open

                                              public function __construct($blockname = false)

                                          BooleanArgumentFlag

                                          Since: 1.4.0

                                          A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                          Example

                                          class Foo {
                                              public function bar($flag = true) {
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                          Remove error control operator '@' on line 245.
                                          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)) {

                                          ErrorControlOperator

                                          Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                          Example

                                          function foo($filePath) {
                                              $file = @fopen($filPath); // hides exceptions
                                              $key = @$array[$notExistingKey]; // assigns null to $key
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#errorcontroloperator

                                          Missing class import via use statement (line '659', column '24').
                                          Open

                                                      $dev = new HWDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '647', column '24').
                                          Open

                                                      $dev = new HWDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '203', column '31').
                                          Open

                                                      $this->_key = new COM("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\default:StdRegProv");

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '671', column '24').
                                          Open

                                                      $dev = new HWDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '189', column '31').
                                          Open

                                                      $objLocator = new COM('WbemScripting.SWbemLocator');

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '196', column '31').
                                          Open

                                                      $this->_reg = new COM("WScript.Shell");

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '581', column '28').
                                          Open

                                                          $cpu = new CpuDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '637', column '24').
                                          Open

                                                      $dev = new HWDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '926', column '40').
                                          Open

                                                                      $dev = new DiskDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '901', column '24').
                                          Open

                                                      $dev = new DiskDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '833', column '32').
                                          Open

                                                              $dev = new NetDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '873', column '28').
                                          Open

                                                          $dev = new DiskDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Missing class import via use statement (line '740', column '32').
                                          Open

                                                              $dev = new NetDevice();

                                          MissingImport

                                          Since: 2.7.0

                                          Importing all external classes in a file through use statements makes them clearly visible.

                                          Example

                                          function make() {
                                              return new \stdClass();
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#MissingImport

                                          Avoid using static access to class 'CommonFunctions' in method '_get_Win32_PerfFormattedData_PerfOS_Processor'.
                                          Open

                                                          $cpubuffer = CommonFunctions::getWMI($this->_wmi, 'Win32_PerfFormattedData_PerfOS_Processor', array('Name', 'PercentProcessorTime'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_get_Win32_ComputerSystem'.
                                          Open

                                                  if ($this->_Win32_ComputerSystem === null) $this->_Win32_ComputerSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_ComputerSystem', array('Name', 'Manufacturer', 'Model'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_get_Win32_OperatingSystem'.
                                          Open

                                                  if ($this->_Win32_OperatingSystem === null) $this->_Win32_OperatingSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_OperatingSystem', array('CodeSet', 'Locale', 'LastBootUpTime', 'LocalDateTime', 'Version', 'ServicePackMajorVersion', 'Caption', 'OSArchitecture', 'TotalVisibleMemorySize', 'FreePhysicalMemory'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_get_Win32_Processor'.
                                          Open

                                                  if ($this->_Win32_Processor === null) $this->_Win32_Processor = CommonFunctions::getWMI($this->_wmi, 'Win32_Processor', array('LoadPercentage', 'AddressWidth', 'Name', 'L2CacheSize', 'L3CacheSize', 'CurrentClockSpeed', 'ExtClock', 'NumberOfCores', 'NumberOfLogicalProcessors', 'MaxClockSpeed', 'Manufacturer'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\".$strInstanceID."\\FriendlyName", $strName, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_get_systeminfo'.
                                          Open

                                                  if ($this->_systeminfo === null) CommonFunctions::executeProgram('systeminfo', '', $this->_systeminfo, false);

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _devicelist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                          } else {
                                                              $this->_wmidisks = CommonFunctions::getWMI($this->_wmi, 'Win32_DiskDrive', array('PNPDeviceID', 'Size'));
                                                          }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          The method _hostname uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                  } else {
                                                      $buffer = $this->_get_Win32_ComputerSystem();
                                                      if (!$buffer && CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\ComputerName", $strBuf, false) && (strlen($strBuf) > 0)) {
                                                              $buffer[0]['Name'] = $strBuf;
                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_hostname'.
                                          Open

                                                          if (CommonFunctions::readenv('COMPUTERNAME', $hnm)) $this->sys->setHostname($hnm);

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid assigning values to variables in if clauses and the like (line '447', column '24').
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_distro'.
                                          Open

                                                  } elseif (CommonFunctions::executeProgram('cmd', '/c ver 2>nul', $ver_value, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _distro uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                              } else {
                                                                  $this->sys->setDistribution($ar_temp[1]);
                                                              }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid assigning values to variables in if clauses and the like (line '513', column '19').
                                          Open

                                              private function _loadavg()
                                              {
                                                  if (($cpubuffer = $this->_get_Win32_PerfFormattedData_PerfOS_Processor()) && isset($cpubuffer['cpu_Total'])) {
                                                      $this->sys->setLoad($cpubuffer['cpu_Total']);
                                                      if (PSI_LOAD_BAR) {

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid assigning values to variables in if clauses and the like (line '753', column '28').
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                                  if (CommonFunctions::readReg($this->_reg, $hkey."\\".$netID."\\Connection\\PnPInstanceId", $strInstanceID, false)) { //a w Name jest net alias

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _devicelist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                      } else {
                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID'));
                                                          $this->_wmidisks = array();
                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_uptime'.
                                          Open

                                                  } elseif (($this->sys->getDistribution()=="ReactOS") && CommonFunctions::executeProgram('uptime', '', $strBuf, false) && (strlen($strBuf) > 0) && preg_match("/^System Up Time:\s+(\d+) days, (\d+) Hours, (\d+) Minutes, (\d+) Seconds/", $strBuf, $ar_buf)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_users'.
                                          Open

                                                  if (CommonFunctions::executeProgram('quser', '', $strBuf, false) && (strlen($strBuf) > 0)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _users uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                  } else {
                                                      $users = 0;
                                                      $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_Process', array('Caption'));
                                                      foreach ($buffer as $process) {
                                                          if (strtoupper($process['Caption']) == strtoupper('explorer.exe')) {

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid assigning values to variables in if clauses and the like (line '786', column '34').
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$netID."\\Connection\\Name", $strCName, false)

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_hostname'.
                                          Open

                                                      if (!$buffer && CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\ComputerName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_hostname'.
                                          Open

                                                      if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _hostname uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                              } else {
                                                                  $this->sys->setHostname(gethostbyaddr($ip));
                                                              }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_distro'.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_getCodeSet'.
                                          Open

                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\Language\\Default", $strBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_devicelist'.
                                          Open

                                                              $this->_wmidisks = CommonFunctions::getWMI($this->_wmi, 'Win32_DiskDrive', array('PNPDeviceID', 'Size'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _loadavg uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                          } else {
                                                              $loadok = false;
                                                              break;
                                                          }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_cpuinfo'.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\~MHz", $strBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                          $allDevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PerfRawData_Tcpip_NetworkInterface', array('Name', 'BytesSentPersec', 'BytesTotalPersec', 'BytesReceivedPersec', 'PacketsReceivedErrors', 'PacketsReceivedDiscarded', 'CurrentBandwidth'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_devicelist'.
                                          Open

                                                              $this->_wmidisks = CommonFunctions::getWMI($this->_wmi, 'Win32_DiskDrive', array('PNPDeviceID', 'Size', 'SerialNumber'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _getCodeSet uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                          } else {
                                                              $codename = '';
                                                          }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          The method _hostname uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                      } else {
                                                          if (CommonFunctions::readenv('COMPUTERNAME', $hnm)) $this->sys->setHostname($hnm);
                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          The method _distro uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                          } else {
                                                              $this->sys->setDistribution("WinNT");
                                                              $this->sys->setDistributionIcon('Win2000.png');
                                                          }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid assigning values to variables in if clauses and the like (line '616', column '138').
                                          Open

                                              private function _machine()
                                              {
                                                  $buffer = $this->_get_Win32_ComputerSystem();
                                                  if ($buffer) {
                                                      $buf = "";

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid assigning values to variables in if clauses and the like (line '243', column '50').
                                          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)) {

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid assigning values to variables in if clauses and the like (line '508', column '14').
                                          Open

                                              private function _loadavg()
                                              {
                                                  if (($cpubuffer = $this->_get_Win32_PerfFormattedData_PerfOS_Processor()) && isset($cpubuffer['cpu_Total'])) {
                                                      $this->sys->setLoad($cpubuffer['cpu_Total']);
                                                      if (PSI_LOAD_BAR) {

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_getCodeSet'.
                                          Open

                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage\\ACP", $strBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _distro uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                                  } else {
                                                                      $this->sys->setDistribution("Microsoft ".$strBuf);
                                                                  }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid assigning values to variables in if clauses and the like (line '753', column '71').
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_cpuinfo'.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\VendorIdentifier", $strBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid assigning values to variables in if clauses and the like (line '245', column '73').
                                          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)) {

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_devicelist'.
                                          Open

                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_devicelist'.
                                          Open

                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _distro uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                      } else {
                                                          $this->sys->setKernel($kernel);
                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_cpuinfo'.
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\ProcessorNameString", $strBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid assigning values to variables in if clauses and the like (line '620', column '131').
                                          Open

                                              private function _machine()
                                              {
                                                  $buffer = $this->_get_Win32_ComputerSystem();
                                                  if ($buffer) {
                                                      $buf = "";

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid assigning values to variables in if clauses and the like (line '823', column '20').
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_users'.
                                          Open

                                                      $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_Process', array('Caption'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _distro uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                  } else {
                                                      $this->sys->setDistribution("WinNT");
                                                      $this->sys->setDistributionIcon('Win2000.png');
                                                  }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid assigning values to variables in if clauses and the like (line '595', column '26').
                                          Open

                                              private function _cpuinfo()
                                              {
                                                  $allCpus = $this->_get_Win32_Processor();
                                                  if (!$allCpus) {
                                                      $hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          Avoid using static access to class 'CommonFunctions' in method '_cpuinfo'.
                                          Open

                                                      if (CommonFunctions::enumKey($this->_key, $hkey, $arrBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_getCodeSet'.
                                          Open

                                                          CommonFunctions::setcp($codeset);

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _devicelist uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                          } else {
                                                              $list[] = array('Name'=>$device['Name']);
                                                          }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                          $allDevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PerfRawData_Tcpip_NetworkAdapter', array('Name', 'BytesSentPersec', 'BytesTotalPersec', 'BytesReceivedPersec', 'PacketsReceivedErrors', 'PacketsReceivedDiscarded', 'CurrentBandwidth'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                          if (CommonFunctions::enumKey($this->_key, $hkey, $arrBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _network uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                      } else {
                                                          $allDevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PerfRawData_Tcpip_NetworkInterface', array('Name', 'BytesSentPersec', 'BytesTotalPersec', 'BytesReceivedPersec', 'PacketsReceivedErrors', 'PacketsReceivedDiscarded', 'CurrentBandwidth'));
                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          The method _network uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                                          } else {
                                                                              $aliases[$cname]['id'] = '';
                                                                          }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_memory'.
                                          Open

                                                      $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_PageFileUsage');

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_filesystems'.
                                          Open

                                                      if (CommonFunctions::executeProgram('cmd', '/c free 2>nul', $out_value, true)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _network uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                                          } else {
                                                                              $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').round($speedinfo/1000000, 2)."Mb/s");
                                                                          }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_processes'.
                                          Open

                                                  if (CommonFunctions::executeProgram('qprocess', '*', $strBuf, false) && (strlen($strBuf) > 0)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _network uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                                      } else {
                                                                          $dev->setName('dev'.$devnr);
                                                                          $devnr++;
                                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid assigning values to variables in if clauses and the like (line '882', column '20').
                                          Open

                                              private function _memory()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer) {

                                          IfStatementAssignment

                                          Since: 2.7.0

                                          Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($foo = 'bar') { // possible typo
                                                      // ...
                                                  }
                                                  if ($baz = 0) { // always false
                                                      // ...
                                                  }
                                              }
                                          }

                                          Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                          The method _filesystems uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                      } else {
                                                          $dev->setName($typearray[$filesystem['DriveType']]);
                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                          if (CommonFunctions::enumKey($this->_key, $hkey, $arrBuf, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                                  if (CommonFunctions::readReg($this->_reg, $hkey."\\".$netCount."\\Description", $strName, false)

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _network uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                              } else {
                                                                  if (preg_match('/\s-\s([^-]*)$/', $name, $ar_name)) {
                                                                      $name=substr($name, 0, strlen($name)-strlen($ar_name[0]));
                                                                  }
                                                                  $dev->setName($name);

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                                      && CommonFunctions::readReg($this->_reg, $hkey."\\".$netCount."\\ServiceName", $strGUID, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_network'.
                                          Open

                                                          $allNetworkAdapterConfigurations = CommonFunctions::getWMI($this->_wmi, 'Win32_NetworkAdapterConfiguration', array('SettingID', /*'Description',*/ 'MACAddress', 'IPAddress'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          The method _network uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                          Open

                                                                      } else {
                                                                          $aliases2[$cname]['id'] = '';
                                                                      }

                                          ElseExpression

                                          Since: 1.4.0

                                          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

                                          Example

                                          class Foo
                                          {
                                              public function bar($flag)
                                              {
                                                  if ($flag) {
                                                      // one branch
                                                  } else {
                                                      // another branch
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#elseexpression

                                          Avoid using static access to class 'CommonFunctions' in method '_filesystems'.
                                          Open

                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_processes'.
                                          Open

                                                      $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_Process', array('Caption'));

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Avoid using static access to class 'CommonFunctions' in method '_filesystems'.
                                          Open

                                                          for ($letter='A'; $letter!='AA'; $letter++) if (CommonFunctions::executeProgram('cmd', '/c free '.$letter.': 2>nul', $out_value, false)) {

                                          StaticAccess

                                          Since: 1.4.0

                                          Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                          Example

                                          class Foo
                                          {
                                              public function bar()
                                              {
                                                  Bar::baz();
                                              }
                                          }

                                          Source https://phpmd.org/rules/cleancode.html#staticaccess

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                  foreach ($this->_devicelist('IDE') as $ideDev) {
                                                      $dev = new HWDevice();
                                                      $dev->setName($ideDev['Name']);
                                                      if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                                                          $dev->setCapacity($ideDev['Capacity']);
                                          Severity: Major
                                          Found in phpsysinfo/includes/os/class.WINNT.inc.php and 1 other location - About 1 hr to fix
                                          phpsysinfo/includes/os/class.WINNT.inc.php on lines 658..668

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 111.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Similar blocks of code found in 2 locations. Consider refactoring.
                                          Open

                                                  foreach ($this->_devicelist('SCSI') as $scsiDev) {
                                                      $dev = new HWDevice();
                                                      $dev->setName($scsiDev['Name']);
                                                      if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                                                          $dev->setCapacity($scsiDev['Capacity']);
                                          Severity: Major
                                          Found in phpsysinfo/includes/os/class.WINNT.inc.php and 1 other location - About 1 hr to fix
                                          phpsysinfo/includes/os/class.WINNT.inc.php on lines 646..656

                                          Duplicated Code

                                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                          Tuning

                                          This issue has a mass of 111.

                                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                          Refactorings

                                          Further Reading

                                          Avoid excessively long variable names like $_Win32_OperatingSystem. Keep variable name length under 20.
                                          Open

                                              private $_Win32_OperatingSystem = null;

                                          LongVariable

                                          Since: 0.2

                                          Detects when a field, formal or local variable is declared with a long name.

                                          Example

                                          class Something {
                                              protected $reallyLongIntName = -3; // VIOLATION - Field
                                              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                                  $otherReallyLongName = -5; // VIOLATION - Local
                                                  for ($interestingIntIndex = 0; // VIOLATION - For
                                                       $interestingIntIndex < 10;
                                                       $interestingIntIndex++ ) {
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/naming.html#longvariable

                                          Avoid excessively long variable names like $_Win32_ComputerSystem. Keep variable name length under 20.
                                          Open

                                              private $_Win32_ComputerSystem = null;

                                          LongVariable

                                          Since: 0.2

                                          Detects when a field, formal or local variable is declared with a long name.

                                          Example

                                          class Something {
                                              protected $reallyLongIntName = -3; // VIOLATION - Field
                                              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                                  $otherReallyLongName = -5; // VIOLATION - Local
                                                  for ($interestingIntIndex = 0; // VIOLATION - For
                                                       $interestingIntIndex < 10;
                                                       $interestingIntIndex++ ) {
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/naming.html#longvariable

                                          Avoid excessively long variable names like $_Win32_PerfFormattedData_PerfOS_Processor. Keep variable name length under 20.
                                          Open

                                              private $_Win32_PerfFormattedData_PerfOS_Processor = null;

                                          LongVariable

                                          Since: 0.2

                                          Detects when a field, formal or local variable is declared with a long name.

                                          Example

                                          class Something {
                                              protected $reallyLongIntName = -3; // VIOLATION - Field
                                              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                                  $otherReallyLongName = -5; // VIOLATION - Local
                                                  for ($interestingIntIndex = 0; // VIOLATION - For
                                                       $interestingIntIndex < 10;
                                                       $interestingIntIndex++ ) {
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/naming.html#longvariable

                                          Avoid excessively long variable names like $allNetworkAdapterConfigurations. Keep variable name length under 20.
                                          Open

                                                          $allNetworkAdapterConfigurations = CommonFunctions::getWMI($this->_wmi, 'Win32_NetworkAdapterConfiguration', array('SettingID', /*'Description',*/ 'MACAddress', 'IPAddress'));

                                          LongVariable

                                          Since: 0.2

                                          Detects when a field, formal or local variable is declared with a long name.

                                          Example

                                          class Something {
                                              protected $reallyLongIntName = -3; // VIOLATION - Field
                                              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                                  $otherReallyLongName = -5; // VIOLATION - Local
                                                  for ($interestingIntIndex = 0; // VIOLATION - For
                                                       $interestingIntIndex < 10;
                                                       $interestingIntIndex++ ) {
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/naming.html#longvariable

                                          Avoid excessively long variable names like $NetworkAdapterConfiguration. Keep variable name length under 20.
                                          Open

                                                                  foreach ($allNetworkAdapterConfigurations as $NetworkAdapterConfiguration) {

                                          LongVariable

                                          Since: 0.2

                                          Detects when a field, formal or local variable is declared with a long name.

                                          Example

                                          class Something {
                                              protected $reallyLongIntName = -3; // VIOLATION - Field
                                              public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                                  $otherReallyLongName = -5; // VIOLATION - Local
                                                  for ($interestingIntIndex = 0; // VIOLATION - For
                                                       $interestingIntIndex < 10;
                                                       $interestingIntIndex++ ) {
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/naming.html#longvariable

                                          Each class must be in a namespace of at least one level (a top-level vendor name)
                                          Open

                                          class WINNT extends OS

                                          The property $_wmidisks is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_Win32_Processor is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_Win32_PerfFormattedData_PerfOS_Processor is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_key is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_syslang is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_wmi is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_wmidevices is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_reg is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_Win32_OperatingSystem is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_Win32_ComputerSystem is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_systeminfo is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          The property $_codepage is not named in camelCase.
                                          Open

                                          class WINNT extends OS
                                          {
                                              /**
                                               * holds the data from WMI Win32_OperatingSystem
                                               *

                                          CamelCasePropertyName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name attributes.

                                          Example

                                          class ClassName {
                                              protected $property_name;
                                          }

                                          Source

                                          Avoid variables with short names like $ip. Configured minimum length is 3.
                                          Open

                                                          $ip = gethostbyname($result);

                                          ShortVariable

                                          Since: 0.2

                                          Detects when a field, local, or parameter has a very short name.

                                          Example

                                          class Something {
                                              private $q = 15; // VIOLATION - Field
                                              public static function main( array $as ) { // VIOLATION - Formal
                                                  $r = 20 + $this->q; // VIOLATION - Local
                                                  for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                                      $r += $this->q;
                                                  }
                                              }
                                          }

                                          Source https://phpmd.org/rules/naming.html#shortvariable

                                          Property name "$_wmidisks" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_wmidisks;

                                          Method name "_get_Win32_ComputerSystem" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _get_Win32_ComputerSystem()

                                          Method name "_getCodeSet" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _getCodeSet()

                                          Expected 1 space before = sign of default value
                                          Open

                                                      if (isset($buffer[0]['Manufacturer']) && !preg_match("/^To be filled by O\.E\.M\.$|^System manufacturer$|^Not Specified$/i", $buf2=$buffer[0]['Manufacturer'])) {

                                          Method name "_memory" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _memory()

                                          Property name "$_Win32_PerfFormattedData_PerfOS_Processor" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_Win32_PerfFormattedData_PerfOS_Processor = null;

                                          Method name "WINNT::_get_Win32_OperatingSystem" is not in camel caps format
                                          Open

                                              private function _get_Win32_OperatingSystem()

                                          Method name "_get_Win32_Processor" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _get_Win32_Processor()

                                          Method name "_devicelist" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _devicelist($strType)

                                          Property name "$_systeminfo" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_systeminfo = null;

                                          Expected 1 space after "=>"; 0 found
                                          Open

                                                              foreach ($netstrls as $nr=>$netstrl) {

                                          Method name "_get_Win32_OperatingSystem" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _get_Win32_OperatingSystem()

                                          Method name "_get_Win32_PerfFormattedData_PerfOS_Processor" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _get_Win32_PerfFormattedData_PerfOS_Processor()

                                          Property name "$_reg" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_reg = null;

                                          Property name "$_codepage" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_codepage = null;

                                          Method name "_get_systeminfo" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _get_systeminfo()

                                          Method name "_hardware" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _hardware()

                                          Expected 1 space before "=>"; 0 found
                                          Open

                                                              foreach ($netstrls as $nr=>$netstrl) {

                                          Property name "$_Win32_OperatingSystem" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_Win32_OperatingSystem = null;

                                          Property name "$_wmidevices" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_wmidevices;

                                          Method name "_uptime" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _uptime()

                                          Method name "_loadavg" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _loadavg()

                                          Method name "WINNT::_get_Win32_ComputerSystem" is not in camel caps format
                                          Open

                                              private function _get_Win32_ComputerSystem()

                                          Method name "WINNT::_get_Win32_PerfFormattedData_PerfOS_Processor" is not in camel caps format
                                          Open

                                              private function _get_Win32_PerfFormattedData_PerfOS_Processor()

                                          Property name "$_key" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_key = null;

                                          Expected 1 space after = sign of default value
                                          Open

                                                      if (isset($buffer[0]['Model']) && !preg_match("/^To be filled by O\.E\.M\.$|^System Product Name$|^Not Specified$/i", $buf2=$buffer[0]['Model'])) {

                                          Property name "$_syslang" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_syslang = null;

                                          Method name "_cpuinfo" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _cpuinfo()

                                          Method name "WINNT::_get_systeminfo" is not in camel caps format
                                          Open

                                              private function _get_systeminfo()

                                          Property name "$_wmi" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_wmi = null;

                                          Method name "_hostname" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _hostname()

                                          Expected 1 space before = sign of default value
                                          Open

                                                      if (isset($buffer[0]['Model']) && !preg_match("/^To be filled by O\.E\.M\.$|^System Product Name$|^Not Specified$/i", $buf2=$buffer[0]['Model'])) {

                                          Method name "_network" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _network()

                                          Method name "_filesystems" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _filesystems()

                                          Property name "$_Win32_ComputerSystem" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_Win32_ComputerSystem = null;

                                          Method name "_users" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              protected function _users()

                                          Method name "_machine" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _machine()

                                          Expected 1 space after = sign of default value
                                          Open

                                                      if (isset($buffer[0]['Manufacturer']) && !preg_match("/^To be filled by O\.E\.M\.$|^System manufacturer$|^Not Specified$/i", $buf2=$buffer[0]['Manufacturer'])) {

                                          Property name "$_Win32_Processor" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private $_Win32_Processor = null;

                                          Method name "WINNT::_get_Win32_Processor" is not in camel caps format
                                          Open

                                              private function _get_Win32_Processor()

                                          Method name "_distro" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              private function _distro()

                                          Method name "_processes" should not be prefixed with an underscore to indicate visibility
                                          Open

                                              public function _processes()

                                          Line exceeds 120 characters; contains 126 characters
                                          Open

                                                              if (!isset($device['PNPClass']) || ($device['PNPClass']===$strType) || ($device['PNPClass']==='System')) {

                                          Line exceeds 120 characters; contains 124 characters
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\VendorIdentifier", $strBuf, false)) {

                                          Line exceeds 120 characters; contains 159 characters
                                          Open

                                                      if (isset($buffer[0]['Model']) && !preg_match("/^To be filled by O\.E\.M\.$|^System Product Name$|^Not Specified$/i", $buf2=$buffer[0]['Model'])) {

                                          Line exceeds 120 characters; contains 261 characters
                                          Open

                                                          $allDevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PerfRawData_Tcpip_NetworkInterface', array('Name', 'BytesSentPersec', 'BytesTotalPersec', 'BytesReceivedPersec', 'PacketsReceivedErrors', 'PacketsReceivedDiscarded', 'CurrentBandwidth'));

                                          Line exceeds 120 characters; contains 126 characters
                                          Open

                                                                      $cname = str_replace(array('(', ')', '#'), array('[', ']', '_'), $strName); //convert to canonical

                                          Inline control structures are not allowed
                                          Open

                                                          if ($cpubuffer) foreach ($cpubuffer as $cpu) {

                                          Line exceeds 120 characters; contains 123 characters
                                          Open

                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID'));

                                          Line exceeds 120 characters; contains 169 characters
                                          Open

                                                              if (($cpubuffer = $this->_get_Win32_PerfFormattedData_PerfOS_Processor()) && (count($cpubuffer) == ($globalcpus+1)) && isset($cpubuffer['cpu'.$i])) {

                                          Line exceeds 120 characters; contains 235 characters
                                          Open

                                                                                 && (trim($NetworkAdapterConfiguration['MACAddress']) !== "")) $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').str_replace(':', '-', strtoupper($NetworkAdapterConfiguration['MACAddress'])));

                                          Inline control structures are not allowed
                                          Open

                                                  if ($this->_systeminfo === null) CommonFunctions::executeProgram('systeminfo', '', $this->_systeminfo, false);

                                          Line exceeds 120 characters; contains 165 characters
                                          Open

                                                              if (isset($oneCpu['MaxClockSpeed']) && ($oneCpu['CurrentClockSpeed'] < $oneCpu['MaxClockSpeed'])) $cpu->setCpuSpeedMax($oneCpu['MaxClockSpeed']);

                                          Line exceeds 120 characters; contains 173 characters
                                          Open

                                                      if (isset($buffer[0]['Manufacturer']) && !preg_match("/^To be filled by O\.E\.M\.$|^System manufacturer$|^Not Specified$/i", $buf2=$buffer[0]['Manufacturer'])) {

                                          Inline control structures are not allowed
                                          Open

                                                                      if ($device['BytesTotalPersec'] > $rxbytes)

                                          Inline control structures are not allowed
                                          Open

                                                      else

                                          Inline control structures are not allowed
                                          Open

                                                              else

                                          Line exceeds 120 characters; contains 127 characters
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$coreCount."\\ProcessorNameString", $strBuf, false)) {

                                          Line exceeds 120 characters; contains 259 characters
                                          Open

                                                          $allDevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PerfRawData_Tcpip_NetworkAdapter', array('Name', 'BytesSentPersec', 'BytesTotalPersec', 'BytesReceivedPersec', 'PacketsReceivedErrors', 'PacketsReceivedDiscarded', 'CurrentBandwidth'));

                                          Line exceeds 120 characters; contains 130 characters
                                          Open

                                                                          $cname = str_replace(array('(', ')', '#'), array('[', ']', '_'), $strName); //convert to canonical

                                          Line exceeds 120 characters; contains 131 characters
                                          Open

                                                                              $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').round($speedinfo/1000000000, 2)."Gb/s");

                                          Line exceeds 120 characters; contains 152 characters
                                          Open

                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          Line exceeds 120 characters; contains 215 characters
                                          Open

                                                      if (!$buffer && CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\ComputerName\\ActiveComputerName\\ComputerName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          Line exceeds 120 characters; contains 263 characters
                                          Open

                                                  } elseif (($this->sys->getDistribution()=="ReactOS") && CommonFunctions::executeProgram('uptime', '', $strBuf, false) && (strlen($strBuf) > 0) && preg_match("/^System Up Time:\s+(\d+) days, (\d+) Hours, (\d+) Minutes, (\d+) Seconds/", $strBuf, $ar_buf)) {

                                          Inline control structures are not allowed
                                          Open

                                                      elseif (version_compare($ver, "6.0", ">=") && version_compare($ver, "6.2", "<"))

                                          Line exceeds 120 characters; contains 174 characters
                                          Open

                                                              elseif ((substr($kernel, 0, 4) == '6.2.') || (substr($kernel, 0, 4) == '6.3.') || (substr($kernel, 0, 4) == '6.4.') || (substr($kernel, 0, 5) == '10.0.'))

                                          Line exceeds 120 characters; contains 135 characters
                                          Open

                                                                              if (CommonFunctions::readReg($this->_reg, $hkey."\\".$netID."\\Connection\\Name", $strCName, false)

                                          Inline control structures are not allowed
                                          Open

                                                                          elseif (preg_match('/\s-\s([^-]*)$/', $mininame, $ar_name))

                                          Line exceeds 120 characters; contains 126 characters
                                          Open

                                                                                          $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').strtolower($ipaddres));

                                          Line exceeds 120 characters; contains 124 characters
                                          Open

                                                                  $this->_Win32_PerfFormattedData_PerfOS_Processor['cpu'.$cpu['Name']] = $cpu['PercentProcessorTime'];

                                          Inline control structures are not allowed
                                          Open

                                                          if (isset($oneCpu['Name'])) $cpu->setModel($oneCpu['Name']);

                                          Line exceeds 120 characters; contains 170 characters
                                          Open

                                                              if (((($ali=$aliases) && isset($ali[$name])) || (($ali=$aliases2) && isset($ali[$name]))) && isset($ali[$name]['id']) && ($ali[$name]['id'] !== "")) {

                                          Line exceeds 120 characters; contains 231 characters
                                          Open

                                                      //$this->error->addError("Windows Scripting Host error", "PhpSysInfo can not initialize Windows Scripting Host for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed.");

                                          Line exceeds 120 characters; contains 126 characters
                                          Open

                                                                      && CommonFunctions::readReg($this->_reg, $hkey."\\".$netCount."\\ServiceName", $strGUID, false)) {

                                          Line exceeds 120 characters; contains 191 characters
                                          Open

                                                          $allNetworkAdapterConfigurations = CommonFunctions::getWMI($this->_wmi, 'Win32_NetworkAdapterConfiguration', array('SettingID', /*'Description',*/ 'MACAddress', 'IPAddress'));

                                          Inline control structures are not allowed
                                          Open

                                                                                      if (($ipaddres != "0.0.0.0") && ($ipaddres != "::") && !preg_match('/^fe80::/i', $ipaddres))

                                          Line exceeds 120 characters; contains 122 characters
                                          Open

                                                                  // magative numbers would occour, try to calculate the nagative value from total - positive number

                                          Line exceeds 120 characters; contains 183 characters
                                          Open

                                                  if ($this->_Win32_ComputerSystem === null) $this->_Win32_ComputerSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_ComputerSystem', array('Name', 'Manufacturer', 'Model'));

                                          Line exceeds 120 characters; contains 154 characters
                                          Open

                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\Language\\Default", $strBuf, false)) {

                                          Line exceeds 120 characters; contains 151 characters
                                          Open

                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));

                                          Inline control structures are not allowed
                                          Open

                                                      if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);

                                          Inline control structures are not allowed
                                          Open

                                                              elseif ((substr($kernel, 0, 4) == '6.0.') || (substr($kernel, 0, 4) == '6.1.'))

                                          Inline control structures are not allowed
                                          Open

                                                                              if ((!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR)

                                          Line exceeds 120 characters; contains 148 characters
                                          Open

                                                                  // there is a possible bug in the wmi interfaceabout uint32 and uint64: http://www.ureader.com/message/1244948.aspx, so that

                                          Line exceeds 120 characters; contains 193 characters
                                          Open

                                          //           && (preg_match("/:\s([\d \xFF]+)\sMB\r\n.+:\s([\d \xFF]+)\sMB\r\n.+:\s([\d \xFF]+)\sMB\r\n.+:\s([\d \xFF]+)\sMB\r\n.+\s([\d \xFF]+)\sMB\r\n.*:\s+(\S+)\r\n/m", $buffer, $buffer2)) {

                                          Line exceeds 120 characters; contains 136 characters
                                          Open

                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');

                                          Line exceeds 120 characters; contains 136 characters
                                          Open

                                                      $this->error->addError("WARN", "The ReactOS version of phpSysInfo is a work in progress, some things currently don't work");

                                          Line exceeds 120 characters; contains 256 characters
                                          Open

                                                      //$this->error->addError("WWinmgmts Impersonationlevel Script Error", "PhpSysInfo can not initialize Winmgmts Impersonationlevel Script for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed.");

                                          Line exceeds 120 characters; contains 145 characters
                                          Open

                                                          if (is_readable(PSI_APP_ROOT.'/data/languages.ini') && ($langdata = @parse_ini_file(PSI_APP_ROOT.'/data/languages.ini', true))) {

                                          Line exceeds 120 characters; contains 319 characters
                                          Open

                                                  if ($this->_Win32_Processor === null) $this->_Win32_Processor = CommonFunctions::getWMI($this->_wmi, 'Win32_Processor', array('LoadPercentage', 'AddressWidth', 'Name', 'L2CacheSize', 'L3CacheSize', 'CurrentClockSpeed', 'ExtClock', 'NumberOfCores', 'NumberOfLogicalProcessors', 'MaxClockSpeed', 'Manufacturer'));

                                          Line exceeds 120 characters; contains 136 characters
                                          Open

                                                                                      if (($ipaddres != "0.0.0.0") && ($ipaddres != "::") && !preg_match('/^fe80::/i', $ipaddres))

                                          Line exceeds 120 characters; contains 130 characters
                                          Open

                                                          $hkey = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}";

                                          Inline control structures are not allowed
                                          Open

                                                                          if (trim($NetworkAdapterConfiguration['MACAddress']) !== "") $macexist = true;

                                          Inline control structures are not allowed
                                          Open

                                                                      else

                                          Line exceeds 120 characters; contains 132 characters
                                          Open

                                                                              if (isset($ali[$name]['netname'])) $dev->setInfo(str_replace(';', ':', $ali[$name]['netname']));

                                          Line exceeds 120 characters; contains 311 characters
                                          Open

                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');

                                          Inline control structures are not allowed
                                          Open

                                                                                  foreach ($NetworkAdapterConfiguration['IPAddress'] as $ipaddres)

                                          Line exceeds 120 characters; contains 154 characters
                                          Open

                                                          for ($letter='A'; $letter!='AA'; $letter++) if (CommonFunctions::executeProgram('cmd', '/c free '.$letter.': 2>nul', $out_value, false)) {

                                          Line exceeds 120 characters; contains 132 characters
                                          Open

                                           * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version

                                          Inline control structures are not allowed
                                          Open

                                                  if ($this->_Win32_Processor === null) $this->_Win32_Processor = CommonFunctions::getWMI($this->_wmi, 'Win32_Processor', array('LoadPercentage', 'AddressWidth', 'Name', 'L2CacheSize', 'L3CacheSize', 'CurrentClockSpeed', 'ExtClock', 'NumberOfCores', 'NumberOfLogicalProcessors', 'MaxClockSpeed', 'Manufacturer'));

                                          Inline control structures are not allowed
                                          Open

                                                      if (version_compare($ver, "5.1", "<"))

                                          Line exceeds 120 characters; contains 178 characters
                                          Open

                                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Enum\\".$strInstanceID."\\FriendlyName", $strName, false)) {

                                          Inline control structures are not allowed
                                          Open

                                                                      else

                                          Line exceeds 120 characters; contains 219 characters
                                          Open

                                                  } elseif (($buffer = $this->_get_systeminfo()) && preg_match("/:\s([\d \xFF]+)\sMB\r\n.+:\s([\d \xFF]+)\sMB\r\n.+:\s([\d \xFF]+)\sMB\r\n.+:\s([\d \xFF]+)\sMB\r\n.+\s([\d \xFF]+)\sMB\r\n/m", $buffer, $buffer2)) {

                                          Inline control structures are not allowed
                                          Open

                                                  if ($this->_Win32_ComputerSystem === null) $this->_Win32_ComputerSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_ComputerSystem', array('Name', 'Manufacturer', 'Model'));

                                          Inline control structures are not allowed
                                          Open

                                                  if ($this->_Win32_OperatingSystem === null) $this->_Win32_OperatingSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_OperatingSystem', array('CodeSet', 'Locale', 'LastBootUpTime', 'LocalDateTime', 'Version', 'ServicePackMajorVersion', 'Caption', 'OSArchitecture', 'TotalVisibleMemorySize', 'FreePhysicalMemory'));

                                          Inline control structures are not allowed
                                          Open

                                                          if (isset($oneCpu['ExtClock'])) $cpu->setBusSpeed($oneCpu['ExtClock']);

                                          Line exceeds 120 characters; contains 213 characters
                                          Open

                                                      $this->error->addError("WMI connect error", "PhpSysInfo can not connect to the WMI interface for security reasons.\nCheck an authentication mechanism for the directory where phpSysInfo is installed.");

                                          Inline control structures are not allowed
                                          Open

                                                      elseif (version_compare($ver, "5.1", ">=") && version_compare($ver, "6.0", "<"))

                                          Line exceeds 120 characters; contains 124 characters
                                          Open

                                                                                 && (str_replace(array('(', ')', '#'), array('[', ']', '_'), $strCName) !== $cname)) {

                                          Line exceeds 120 characters; contains 189 characters
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          Inline control structures are not allowed
                                          Open

                                                              if ((($kernel[1] == '.') && ($kernel[0] <5)) || (substr($kernel, 0, 4) == '5.0.'))

                                          Inline control structures are not allowed
                                          Open

                                                                          if (preg_match('/^isatap\.({[A-Fa-f0-9\-]*})/', $mininame))

                                          Line exceeds 120 characters; contains 128 characters
                                          Open

                                                                              $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').round($speedinfo/1000000, 2)."Mb/s");

                                          Inline control structures are not allowed
                                          Open

                                                                      if ($device['BytesTotalPersec'] > $txbytes)

                                          Line exceeds 120 characters; contains 125 characters
                                          Open

                                                              $this->_wmidisks = CommonFunctions::getWMI($this->_wmi, 'Win32_DiskDrive', array('PNPDeviceID', 'Size'));

                                          Inline control structures are not allowed
                                          Open

                                                          if (CommonFunctions::readenv('COMPUTERNAME', $hnm)) $this->sys->setHostname($hnm);

                                          Inline control structures are not allowed
                                          Open

                                                              elseif ((substr($kernel, 0, 4) == '6.2.') || (substr($kernel, 0, 4) == '6.3.') || (substr($kernel, 0, 4) == '6.4.') || (substr($kernel, 0, 5) == '10.0.'))

                                          Inline control structures are not allowed
                                          Open

                                                              if (isset($oneCpu['MaxClockSpeed']) && ($oneCpu['CurrentClockSpeed'] < $oneCpu['MaxClockSpeed'])) $cpu->setCpuSpeedMax($oneCpu['MaxClockSpeed']);

                                          Inline control structures are not allowed
                                          Open

                                                                              if (isset($NetworkAdapterConfiguration['IPAddress']))

                                          Line exceeds 120 characters; contains 324 characters
                                          Open

                                                  if ($this->_Win32_OperatingSystem === null) $this->_Win32_OperatingSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_OperatingSystem', array('CodeSet', 'Locale', 'LastBootUpTime', 'LocalDateTime', 'Version', 'ServicePackMajorVersion', 'Caption', 'OSArchitecture', 'TotalVisibleMemorySize', 'FreePhysicalMemory'));

                                          Line exceeds 120 characters; contains 141 characters
                                          Open

                                                              $this->_wmidisks = CommonFunctions::getWMI($this->_wmi, 'Win32_DiskDrive', array('PNPDeviceID', 'Size', 'SerialNumber'));

                                          Line exceeds 120 characters; contains 196 characters
                                          Open

                                                              $list[] = array('Name'=>$device['Name'], 'Manufacturer'=>$device['Manufacturer'], 'Product'=>$device['PNPClass'], 'Capacity'=>$device['Capacity'], 'Serial'=>$device['Serial']);

                                          Inline control structures are not allowed
                                          Open

                                                          if (isset($oneCpu['Manufacturer'])) $cpu->setVendorId($oneCpu['Manufacturer']);

                                          Line exceeds 120 characters; contains 154 characters
                                          Open

                                                  } elseif (($buffer = $this->_get_systeminfo()) && preg_match('/^(\s+)\[\d+\]:[^\r\n]+\r\n\s+[^\s\[]/m', $buffer, $matches, PREG_OFFSET_CAPTURE)) {

                                          Line exceeds 120 characters; contains 132 characters
                                          Open

                                           * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version

                                          Line exceeds 120 characters; contains 149 characters
                                          Open

                                                          $cpubuffer = CommonFunctions::getWMI($this->_wmi, 'Win32_PerfFormattedData_PerfOS_Processor', array('Name', 'PercentProcessorTime'));

                                          Line exceeds 120 characters; contains 150 characters
                                          Open

                                                      if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage\\ACP", $strBuf, false)) {

                                          Inline control structures are not allowed
                                          Open

                                                          foreach ($allDevices as $device) if (!preg_match('/^WAN Miniport \[/', $device['Name'])) {

                                          Inline control structures are not allowed
                                          Open

                                                                              if (isset($ali[$name]['netname'])) $dev->setInfo(str_replace(';', ':', $ali[$name]['netname']));

                                          Inline control structures are not allowed
                                          Open

                                                                      if (($ipaddres!="0.0.0.0") && !preg_match('/^fe80::/i', $ipaddres))

                                          Inline control structures are not allowed
                                          Open

                                                          for ($letter='A'; $letter!='AA'; $letter++) if (CommonFunctions::executeProgram('cmd', '/c free '.$letter.': 2>nul', $out_value, false)) {

                                          Line indented incorrectly; expected 16 spaces, found 20
                                          Open

                                                              }

                                          Line indented incorrectly; expected 16 spaces, found 20
                                          Open

                                                              else

                                          Line indented incorrectly; expected 12 spaces, found 16
                                          Open

                                                          }

                                          Expected 1 space after ELSE keyword; newline found
                                          Open

                                                                      else

                                          Line indented incorrectly; expected 16 spaces, found 20
                                          Open

                                                              } else {

                                          Line indented incorrectly; expected 20 spaces, found 24
                                          Open

                                                                  }

                                          Expected 1 space after ELSE keyword; newline found
                                          Open

                                                                      else

                                          Line indented incorrectly; expected 20 spaces, found 24
                                          Open

                                                                  } else {

                                          Expected 1 space after ELSE keyword; newline found
                                          Open

                                                              else

                                          Line indented incorrectly; expected 12 spaces, found 16
                                          Open

                                                          } else {

                                          Line indented incorrectly; expected 12 spaces, found 16
                                          Open

                                                          } elseif (preg_match("/^(Microsoft [^\[]*)\s*\[\D*\s*(.+)\]/", $ver_value, $ar_temp)) {

                                          Line indented incorrectly; expected 20 spaces, found 24
                                          Open

                                                                  if (preg_match("/^Microsoft /", $strBuf)) {

                                          Expected 1 space after ELSE keyword; newline found
                                          Open

                                                      else

                                          Line indented incorrectly; expected 12 spaces, found 16
                                          Open

                                                          if (preg_match("/ReactOS\r?\nVersion\s+(.+)/", $ver_value, $ar_temp)) {

                                          Line indented incorrectly; expected 16 spaces, found 20
                                          Open

                                                              if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName", $strBuf, false) && (strlen($strBuf) > 0)) {

                                          The variable $ar_temp is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ver_value is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_buf is not named in camelCase.
                                          Open

                                              private function _uptime()
                                              {
                                                  $result = 0;
                                                  date_default_timezone_set('UTC');
                                                  $buffer = $this->_get_Win32_OperatingSystem();

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $NetworkAdapterConfiguration is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $NetworkAdapterConfiguration is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $NetworkAdapterConfiguration is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_temp is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_name is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ver_value is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_temp is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_temp is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $NetworkAdapterConfiguration is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_buf is not named in camelCase.
                                          Open

                                              private function _uptime()
                                              {
                                                  $result = 0;
                                                  date_default_timezone_set('UTC');
                                                  $buffer = $this->_get_Win32_OperatingSystem();

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_name is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_buf is not named in camelCase.
                                          Open

                                              private function _uptime()
                                              {
                                                  $result = 0;
                                                  date_default_timezone_set('UTC');
                                                  $buffer = $this->_get_Win32_OperatingSystem();

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $NetworkAdapterConfiguration is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $NetworkAdapterConfiguration is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_buf is not named in camelCase.
                                          Open

                                              private function _uptime()
                                              {
                                                  $result = 0;
                                                  date_default_timezone_set('UTC');
                                                  $buffer = $this->_get_Win32_OperatingSystem();

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ver_value is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_name is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $NetworkAdapterConfiguration is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_temp is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_buf is not named in camelCase.
                                          Open

                                              private function _uptime()
                                              {
                                                  $result = 0;
                                                  date_default_timezone_set('UTC');
                                                  $buffer = $this->_get_Win32_OperatingSystem();

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $ar_name is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $out_dig is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $out_value is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $out_value is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $out_dig is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $out_dig is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $out_dig is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The variable $out_value is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseVariableName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name variables.

                                          Example

                                          class ClassName {
                                              public function doSomething() {
                                                  $data_module = new DataModule();
                                              }
                                          }

                                          Source

                                          The method _get_Win32_OperatingSystem is not named in camelCase.
                                          Open

                                              private function _get_Win32_OperatingSystem()
                                              {
                                                  if ($this->_Win32_OperatingSystem === null) $this->_Win32_OperatingSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_OperatingSystem', array('CodeSet', 'Locale', 'LastBootUpTime', 'LocalDateTime', 'Version', 'ServicePackMajorVersion', 'Caption', 'OSArchitecture', 'TotalVisibleMemorySize', 'FreePhysicalMemory'));
                                                  return $this->_Win32_OperatingSystem;
                                              }

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _get_Win32_ComputerSystem is not named in camelCase.
                                          Open

                                              private function _get_Win32_ComputerSystem()
                                              {
                                                  if ($this->_Win32_ComputerSystem === null) $this->_Win32_ComputerSystem = CommonFunctions::getWMI($this->_wmi, 'Win32_ComputerSystem', array('Name', 'Manufacturer', 'Model'));
                                                  return $this->_Win32_ComputerSystem;
                                              }

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _get_Win32_PerfFormattedData_PerfOS_Processor is not named in camelCase.
                                          Open

                                              private function _get_Win32_PerfFormattedData_PerfOS_Processor()
                                              {
                                                  if ($this->_Win32_PerfFormattedData_PerfOS_Processor === null) {
                                                      $this->_Win32_PerfFormattedData_PerfOS_Processor = array();
                                                      $buffer = $this->_get_Win32_OperatingSystem();

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _users is not named in camelCase.
                                          Open

                                              protected function _users()
                                              {
                                                  if (CommonFunctions::executeProgram('quser', '', $strBuf, false) && (strlen($strBuf) > 0)) {
                                                          $lines = preg_split('/\n/', $strBuf);
                                                          $users = count($lines)-1;

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _loadavg is not named in camelCase.
                                          Open

                                              private function _loadavg()
                                              {
                                                  if (($cpubuffer = $this->_get_Win32_PerfFormattedData_PerfOS_Processor()) && isset($cpubuffer['cpu_Total'])) {
                                                      $this->sys->setLoad($cpubuffer['cpu_Total']);
                                                      if (PSI_LOAD_BAR) {

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _uptime is not named in camelCase.
                                          Open

                                              private function _uptime()
                                              {
                                                  $result = 0;
                                                  date_default_timezone_set('UTC');
                                                  $buffer = $this->_get_Win32_OperatingSystem();

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _devicelist is not named in camelCase.
                                          Open

                                              private function _devicelist($strType)
                                              {
                                                  if (empty($this->_wmidevices)) {
                                                      if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                                                          $this->_wmidevices = CommonFunctions::getWMI($this->_wmi, 'Win32_PnPEntity', array('Name', 'PNPDeviceID', 'Manufacturer', 'PNPClass'));

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _distro is not named in camelCase.
                                          Open

                                              private function _distro()
                                              {
                                                  $buffer = $this->_get_Win32_OperatingSystem();
                                                  if ($buffer) {
                                                      $ver = $buffer[0]['Version'];

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _get_Win32_Processor is not named in camelCase.
                                          Open

                                              private function _get_Win32_Processor()
                                              {
                                                  if ($this->_Win32_Processor === null) $this->_Win32_Processor = CommonFunctions::getWMI($this->_wmi, 'Win32_Processor', array('LoadPercentage', 'AddressWidth', 'Name', 'L2CacheSize', 'L3CacheSize', 'CurrentClockSpeed', 'ExtClock', 'NumberOfCores', 'NumberOfLogicalProcessors', 'MaxClockSpeed', 'Manufacturer'));
                                                  return $this->_Win32_Processor;
                                              }

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _get_systeminfo is not named in camelCase.
                                          Open

                                              private function _get_systeminfo()
                                              {
                                                  if ($this->_systeminfo === null) CommonFunctions::executeProgram('systeminfo', '', $this->_systeminfo, false);
                                                  return $this->_systeminfo;
                                              }

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _hardware is not named in camelCase.
                                          Open

                                              private function _hardware()
                                              {
                                                  foreach ($this->_devicelist('PCI') as $pciDev) {
                                                      $dev = new HWDevice();
                                                      $dev->setName($pciDev['Name']);

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _hostname is not named in camelCase.
                                          Open

                                              private function _hostname()
                                              {
                                                  if (PSI_USE_VHOST === true) {
                                                      if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
                                                  } else {

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _network is not named in camelCase.
                                          Open

                                              private function _network()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _cpuinfo is not named in camelCase.
                                          Open

                                              private function _cpuinfo()
                                              {
                                                  $allCpus = $this->_get_Win32_Processor();
                                                  if (!$allCpus) {
                                                      $hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _getCodeSet is not named in camelCase.
                                          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)) {

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _machine is not named in camelCase.
                                          Open

                                              private function _machine()
                                              {
                                                  $buffer = $this->_get_Win32_ComputerSystem();
                                                  if ($buffer) {
                                                      $buf = "";

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _filesystems is not named in camelCase.
                                          Open

                                              private function _filesystems()
                                              {
                                                  $typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
                                                  $floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
                                                  $buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _processes is not named in camelCase.
                                          Open

                                              public function _processes()
                                              {
                                                  $processes['*'] = 0;
                                                  if (CommonFunctions::executeProgram('qprocess', '*', $strBuf, false) && (strlen($strBuf) > 0)) {
                                                      $lines = preg_split('/\n/', $strBuf);

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          The method _memory is not named in camelCase.
                                          Open

                                              private function _memory()
                                              {
                                                  if ($this->_wmi) {
                                                      $buffer = $this->_get_Win32_OperatingSystem();
                                                      if ($buffer) {

                                          CamelCaseMethodName

                                          Since: 0.2

                                          It is considered best practice to use the camelCase notation to name methods.

                                          Example

                                          class ClassName {
                                              public function get_name() {
                                              }
                                          }

                                          Source

                                          There are no issues that match your filters.

                                          Category
                                          Status