XoopsModules25x/xoopsinfo

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

Summary

Maintainability
F
1 wk
Test Coverage

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

    protected function prtconf()
    {
        if ($this->_prtconf === null) {
            $this->_prtconf = array();
            if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {
Severity: Minor
Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 3 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

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

    private function _network()
    {
        if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
            $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
            foreach ($lines as $line) {
Severity: Minor
Found in phpsysinfo/includes/os/class.SunOS.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 _pci has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _pci()
    {
        $prtconf = $this->prtconf();
        if ((count($prtconf)>1) && isset($prtconf['pci'])) {
            foreach ($prtconf['pci'] as $prt) {
Severity: Minor
Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 7 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 36 (exceeds 5 allowed). Consider refactoring.
Open

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

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

<?php
/**
 * SunOS System Class
 *
 * PHP version 5
Severity: Minor
Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 4 hrs to fix

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

    class SunOS extends OS
    {
    
        /**
         * content of prtconf -v

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

        private function _cpuinfo()
        {
            if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                for ($cpu=0; $cpu < $cpuc; $cpu++) {
    Severity: Minor
    Found in phpsysinfo/includes/os/class.SunOS.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 _processes has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function _processes()
        {
            if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
                $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                $processes['*'] = 0;
    Severity: Minor
    Found in phpsysinfo/includes/os/class.SunOS.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 prtconf has 59 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function prtconf()
        {
            if ($this->_prtconf === null) {
                $this->_prtconf = array();
                if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {
    Severity: Major
    Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 2 hrs to fix

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

          private function _network()
          {
              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                  foreach ($lines as $line) {
      Severity: Major
      Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 2 hrs to fix

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

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

          Method _pci has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function _pci()
              {
                  $prtconf = $this->prtconf();
                  if ((count($prtconf)>1) && isset($prtconf['pci'])) {
                      foreach ($prtconf['pci'] as $prt) {
          Severity: Minor
          Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 1 hr to fix

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

                private function _cpuinfo()
                {
                    if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                        $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                        for ($cpu=0; $cpu < $cpuc; $cpu++) {
            Severity: Minor
            Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 1 hr to fix

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

                  private function _distro()
                  {
                      if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
                          $this->sys->setDistribution(trim($buf));
                          $list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);
              Severity: Minor
              Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 55 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 _hostname has a Cognitive Complexity of 9 (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.SunOS.inc.php - About 55 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 _kernel has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function _kernel()
                  {
                      if (CommonFunctions::executeProgram('uname', '-s', $os, PSI_DEBUG) && ($os!="")) {
                          if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {
                              $os.=' '.$version;
              Severity: Minor
              Found in phpsysinfo/includes/os/class.SunOS.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 (count($grouparr)) {
                                              $this->_prtconf[$group][] = $grouparr;
                                          }
              Severity: Major
              Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            if (!empty($blocks1) && count($blocks1)) {
                                                array_shift($blocks1);
                                                foreach ($blocks1 as $block1) {
                                                    if (!preg_match('/^        name=\'([^\']+)\'/',$block1)
                                                       && preg_match('/^        (\S+) /',$block1, $ar_buf)) {
                Severity: Major
                Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                  if (preg_match('/^\s+inet6\s+([^\s\/]+)/i', $buf2, $ar_buf2)
                                                     && ($ar_buf2[1]!="::") && !preg_match('/^fe80::/i', $ar_buf2[1]))
                                                      $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').strtolower($ar_buf2[1]));
                  Severity: Major
                  Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                    if (preg_match('/^\s+ether\s+(\S+)/i', $buf2, $ar_buf2)) {
                                                        if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));
                                                    } elseif (preg_match('/^\s+inet\s+(\S+)\s+netmask/i', $buf2, $ar_buf2)) {
                                                        $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
                                                    }
                    Severity: Major
                    Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 45 mins to fix

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

                          public function build()
                          {
                              $this->error->addError("WARN", "The SunOS version of phpSysInfo is a work in progress, some things currently don't work");
                              if (!$this->blockname || $this->blockname==='vitals') {
                                  $this->_distro();
                      Severity: Minor
                      Found in phpsysinfo/includes/os/class.SunOS.inc.php - About 25 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 2218. The configured NPath complexity threshold is 200.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 243. The configured NPath complexity threshold is 200.
                      Open

                          public function build()
                          {
                              $this->error->addError("WARN", "The SunOS version of phpSysInfo is a work in progress, some things currently don't work");
                              if (!$this->blockname || $this->blockname==='vitals') {
                                  $this->_distro();

                      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 prtconf() has a Cyclomatic Complexity of 26. The configured cyclomatic complexity threshold is 10.
                      Open

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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 11. The configured cyclomatic complexity threshold is 10.
                      Open

                          private function _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 _pci() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
                      Open

                          protected function _pci()
                          {
                              $prtconf = $this->prtconf();
                              if ((count($prtconf)>1) && isset($prtconf['pci'])) {
                                  foreach ($prtconf['pci'] as $prt) {

                      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 14. The configured cyclomatic complexity threshold is 10.
                      Open

                          private function _cpuinfo()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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 29. The configured cyclomatic complexity threshold is 10.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 11. The configured cyclomatic complexity threshold is 10.
                      Open

                          public function build()
                          {
                              $this->error->addError("WARN", "The SunOS version of phpSysInfo is a work in progress, some things currently don't work");
                              if (!$this->blockname || $this->blockname==='vitals') {
                                  $this->_distro();

                      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 '$buf' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($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 '$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 '$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 '$subversion' which will lead to PHP notices.
                      Open

                                      $os.=' ('.$subversion.')';

                      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 '$result' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) {

                      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 (isset($processes[$state])) {

                      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 '$buf' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($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 '$m' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {

                      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 '$bufr2' which will lead to PHP notices.
                      Open

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0], $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      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 '$bufr' which will lead to PHP notices.
                      Open

                                  $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);

                      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['*']++;

                      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 '$m' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::executeProgram('kstat', '-p d '.$key, $m, PSI_DEBUG) && ($m!=="")) {

                      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 '$subversion' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-v', $subversion, PSI_DEBUG) && ($subversion!="")) {

                      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 '$platform' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-i', $platform, PSI_DEBUG) && ($platform!="")) {

                      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 '$buf' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($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 '$result' which will lead to PHP notices.
                      Open

                                      if ($ip != $result) {

                      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 '$netstat' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {

                      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 '$bufr2' which will lead to PHP notices.
                      Open

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0].' inet6', $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      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 '$buf' which will lead to PHP notices.
                      Open

                                  $this->sys->setDistribution(trim($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 '$m' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::executeProgram('kstat', '-p d '.$key, $m, PSI_DEBUG) && ($m!=="")) {

                      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 '$results' which will lead to PHP notices.
                      Open

                                          $results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[7];

                      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 '$buf' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($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 '$subversion' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-v', $subversion, PSI_DEBUG) && ($subversion!="")) {

                      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 '$bufr2' which will lead to PHP notices.
                      Open

                                                  $bufe2 = preg_split("/\n/", $bufr2, -1, PREG_SPLIT_NO_EMPTY);

                      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 '$buf' which will lead to PHP notices.
                      Open

                                      $blocks = preg_split( '/\n(?=    \S)/', $buf, -1, PREG_SPLIT_NO_EMPTY);

                      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 '$m' which will lead to PHP notices.
                      Open

                                  list($key, $value) = preg_split("/\t/", $m, 2);

                      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 '$result' which will lead to PHP notices.
                      Open

                                      $ip = gethostbyname($result);

                      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 '$version' which will lead to PHP notices.
                      Open

                                      $os.=' '.$version;

                      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[$state] = 1;

                      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 '$platform' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-i', $platform, PSI_DEBUG) && ($platform!="")) {

                      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 '$platform' which will lead to PHP notices.
                      Open

                                      $os.=' '.$platform;

                      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 '$bufr2' which will lead to PHP notices.
                      Open

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0].' inet6', $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      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 '$bufr' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {

                      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 '$version' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {

                      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 '$m' which will lead to PHP notices.
                      Open

                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {

                      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 '$m' which will lead to PHP notices.
                      Open

                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));

                      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[$state]++;

                      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 '$bufr2' which will lead to PHP notices.
                      Open

                                                  $bufe2 = preg_split("/\n/", $bufr2, -1, PREG_SPLIT_NO_EMPTY);

                      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 '$buf' which will lead to PHP notices.
                      Open

                                  if ($list && preg_match('/^(\S+)\s*/', preg_replace('/^Open\s+/', 'Open', preg_replace('/^Oracle\s+/', 'Oracle', trim($buf))), $id_buf) && isset($list[$distid=(trim($id_buf[1].' SunOS'))]['Image'])) {

                      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 '$version' which will lead to PHP notices.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {

                      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 '$netstat' which will lead to PHP notices.
                      Open

                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);

                      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 '$bufr2' which will lead to PHP notices.
                      Open

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0], $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      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

                      Missing class import via use statement (line '341', column '20').
                      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 '199', column '28').
                      Open

                                      $dev = 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 '279', 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 '364', column '32').
                      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

                      Remove error control operator '@' on line 405.
                      Open

                          private function _distro()
                          {
                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
                                  $this->sys->setDistribution(trim($buf));
                                  $list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);

                      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 '239', column '40').
                      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

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

                              if (CommonFunctions::executeProgram('kstat', '-p d '.$key, $m, PSI_DEBUG) && ($m!=="")) {

                      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 '200', column '22').
                      Open

                          private function _cpuinfo()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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 '212', column '22').
                      Open

                          private function _cpuinfo()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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 '202', column '28').
                      Open

                          private function _cpuinfo()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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 _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->setDistributionIcon('SunOS.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 using static access to class 'CommonFunctions' in method '_hostname'.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) {

                      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 _kstat uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                      Open

                              } else {
                                  return '';
                              }

                      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 '_kernel'.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-v', $subversion, PSI_DEBUG) && ($subversion!="")) {

                      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::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {

                      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 _pci uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                      Open

                                                  } else {
                                                      $name = $pcidev['device'];
                                                  }

                      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

                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {

                      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('SunOS');
                                  $this->sys->setDistributionIcon('SunOS.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 using static access to class 'CommonFunctions' in method '_processes'.
                      Open

                              if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {

                      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 'prtconf'.
                      Open

                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($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 '_cpuinfo'.
                      Open

                                      } elseif (CommonFunctions::executeProgram('uname', '-i', $buf, PSI_DEBUG) && ($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 '_network'.
                      Open

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0], $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      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 {
                                  if (CommonFunctions::executeProgram('uname', '-n', $result, PSI_DEBUG)) {
                                      $ip = gethostbyname($result);
                                      if ($ip != $result) {
                                          $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 '_filesystems'.
                      Open

                                          if (CommonFunctions::executeProgram('df', '-n', $dftypes, PSI_DEBUG)) {

                      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

                                          } elseif (CommonFunctions::executeProgram('df', '-T', $dftypes, PSI_DEBUG)) {

                      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 '_kernel'.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {

                      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

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

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0].' inet6', $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      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 _processes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                      Open

                                          } else {
                                              $processes[$state] = 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 '207', column '26').
                      Open

                          private function _cpuinfo()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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

                                      } elseif (CommonFunctions::executeProgram('uname', '-p', $buf, PSI_DEBUG) && ($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 assigning values to variables in if clauses and the like (line '205', column '22').
                      Open

                          private function _cpuinfo()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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 '406', column '164').
                      Open

                          private function _distro()
                          {
                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
                                  $this->sys->setDistribution(trim($buf));
                                  $list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);

                      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::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {

                      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 {
                                              $prefix = "";
                                          }

                      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 '_kernel'.
                      Open

                              if (CommonFunctions::executeProgram('uname', '-s', $os, PSI_DEBUG) && ($os!="")) {

                      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 '_distro'.
                      Open

                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($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 '_kernel'.
                      Open

                                  if (CommonFunctions::executeProgram('uname', '-i', $platform, PSI_DEBUG) && ($platform!="")) {

                      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 '214', column '28').
                      Open

                          private function _cpuinfo()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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 unused local variables such as '$results'.
                      Open

                                          $results[$ar_buf[0]]['errs'] = $ar_buf[5] + $ar_buf[7];

                      UnusedLocalVariable

                      Since: 0.2

                      Detects when a local variable is declared and/or assigned, but not used.

                      Example

                      class Foo {
                          public function doSomething()
                          {
                              $i = 5; // Unused
                          }
                      }

                      Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

                      Similar blocks of code found in 2 locations. Consider refactoring.
                      Open

                          protected function _processes()
                          {
                              if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                                  $processes['*'] = 0;
                      Severity: Major
                      Found in phpsysinfo/includes/os/class.SunOS.inc.php and 1 other location - About 6 hrs to fix
                      phpsysinfo/includes/os/class.Darwin.inc.php on lines 447..470

                      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 215.

                      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

                          public function build()
                          {
                              $this->error->addError("WARN", "The SunOS version of phpSysInfo is a work in progress, some things currently don't work");
                              if (!$this->blockname || $this->blockname==='vitals') {
                                  $this->_distro();
                      Severity: Major
                      Found in phpsysinfo/includes/os/class.SunOS.inc.php and 1 other location - About 5 hrs to fix
                      phpsysinfo/includes/os/class.Minix.inc.php on lines 333..358

                      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 185.

                      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 ($bufe2 as $buf2) {
                                                      if (preg_match('/^\s+ether\s+(\S+)/i', $buf2, $ar_buf2)) {
                                                          if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));
                                                      } elseif (preg_match('/^\s+inet\s+(\S+)\s+netmask/i', $buf2, $ar_buf2)) {
                                                          $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
                      Severity: Major
                      Found in phpsysinfo/includes/os/class.SunOS.inc.php and 1 other location - About 3 hrs to fix
                      phpsysinfo/includes/os/class.QNX.inc.php on lines 189..195

                      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 145.

                      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

                      Identical blocks of code found in 4 locations. Consider refactoring.
                      Open

                          private function _hostname()
                          {
                              if (PSI_USE_VHOST === true) {
                                  if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
                              } else {
                      Severity: Major
                      Found in phpsysinfo/includes/os/class.SunOS.inc.php and 3 other locations - About 1 hr to fix
                      phpsysinfo/includes/os/class.Haiku.inc.php on lines 209..221
                      phpsysinfo/includes/os/class.Minix.inc.php on lines 231..243
                      phpsysinfo/includes/os/class.QNX.inc.php on lines 126..138

                      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 113.

                      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

                      Each class must be in a namespace of at least one level (a top-level vendor name)
                      Open

                      class SunOS extends OS

                      The property $_prtconf is not named in camelCase.
                      Open

                      class SunOS extends OS
                      {
                      
                          /**
                           * content of prtconf -v

                      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

                      Method name "_hostname" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _hostname()

                      Method name "_uptime" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _uptime()

                      Method name "_cpuinfo" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _cpuinfo()

                      Expected 1 space before = sign of default value
                      Open

                                  if ($list && preg_match('/^(\S+)\s*/', preg_replace('/^Open\s+/', 'Open', preg_replace('/^Oracle\s+/', 'Oracle', trim($buf))), $id_buf) && isset($list[$distid=(trim($id_buf[1].' SunOS'))]['Image'])) {

                      Property name "$_prtconf" should not be prefixed with an underscore to indicate visibility
                      Open

                          private $_prtconf = null;

                      Method name "_distro" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _distro()

                      Method name "_kernel" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _kernel()

                      Expected 1 space after = sign of default value
                      Open

                                  if ($list && preg_match('/^(\S+)\s*/', preg_replace('/^Open\s+/', 'Open', preg_replace('/^Oracle\s+/', 'Oracle', trim($buf))), $id_buf) && isset($list[$distid=(trim($id_buf[1].' SunOS'))]['Image'])) {

                      Method name "_kstat" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _kstat($key)

                      Method name "_processes" should not be prefixed with an underscore to indicate visibility
                      Open

                          protected function _processes()

                      Method name "_pci" should not be prefixed with an underscore to indicate visibility
                      Open

                          protected function _pci()

                      Method name "_memory" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _memory()

                      Method name "_loadavg" should not be prefixed with an underscore to indicate visibility
                      Open

                          private function _loadavg()

                      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()

                      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 (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));

                      Line exceeds 120 characters; contains 139 characters
                      Open

                                                                          $blocks3 = preg_split( '/\n(?=                \S)/', $block2, -1, PREG_SPLIT_NO_EMPTY);

                      Inline control structures are not allowed
                      Open

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

                      Inline control structures are not allowed
                      Open

                                                      if (preg_match('/^\s+inet6\s+([^\s\/]+)/i', $buf2, $ar_buf2)

                      Line exceeds 120 characters; contains 124 characters
                      Open

                                                      if (isset($pcidev['subsystem-name']) && ($pcidev['subsystem-name']!=='unknown subsystem')) {

                      Line exceeds 120 characters; contains 213 characters
                      Open

                                                          if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));

                      Inline control structures are not allowed
                      Open

                                          if ($state == 'O') $state = 'R'; //linux format

                      Line exceeds 120 characters; contains 131 characters
                      Open

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0].' inet6', $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      Line exceeds 120 characters; contains 164 characters
                      Open

                                                                                  if (preg_match('/^                name=\'([^\']+)\' [\s\S]+ value=\'?([^\']+)\'?/m',$block3, $ar_buf)) {

                      Inline control structures are not allowed
                      Open

                                          elseif ($state == 'W') $state = 'D';

                      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 212 characters
                      Open

                                  if ($list && preg_match('/^(\S+)\s*/', preg_replace('/^Open\s+/', 'Open', preg_replace('/^Oracle\s+/', 'Oracle', trim($buf))), $id_buf) && isset($list[$distid=(trim($id_buf[1].' SunOS'))]['Image'])) {

                      Line exceeds 120 characters; contains 130 characters
                      Open

                              $this->error->addError("WARN", "The SunOS version of phpSysInfo is a work in progress, some things currently don't work");

                      Line exceeds 120 characters; contains 122 characters
                      Open

                                              if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0], $bufr2, PSI_DEBUG) && ($bufr2!=="")) {

                      Line exceeds 120 characters; contains 123 characters
                      Open

                                                              $blocks2 = preg_split( '/\n(?=            \S)/', $block1, -1, PREG_SPLIT_NO_EMPTY);

                      Inline control structures are not allowed
                      Open

                                          elseif ($state == 'D') $state = 'd'; //invalid

                      No space found after comma in function call
                      Open

                                                                                  if (preg_match('/^                name=\'([^\']+)\' [\s\S]+ value=\'?([^\']+)\'?/m',$block3, $ar_buf)) {

                      Space after opening parenthesis of function call prohibited
                      Open

                                                              $blocks2 = preg_split( '/\n(?=            \S)/', $block1, -1, PREG_SPLIT_NO_EMPTY);

                      No space found after comma in function call
                      Open

                                              if (preg_match('/^    (\S+) /',$block, $ar_buf)) {

                      No space found after comma in function call
                      Open

                                                             && preg_match('/^        (\S+) /',$block1, $ar_buf)) {

                      No space found after comma in function call
                      Open

                                                                      if (!preg_match('/^            name=\'([^\']+)\'/',$block2)

                      Space after opening parenthesis of function call prohibited
                      Open

                                                                          $blocks3 = preg_split( '/\n(?=                \S)/', $block2, -1, PREG_SPLIT_NO_EMPTY);

                      No space found after comma in function call
                      Open

                                                          if (!preg_match('/^        name=\'([^\']+)\'/',$block1)

                      Closing brace indented incorrectly; expected 8 spaces, found 9
                      Open

                               }

                      Space after opening parenthesis of function call prohibited
                      Open

                                      $blocks = preg_split( '/\n(?=    \S)/', $buf, -1, PREG_SPLIT_NO_EMPTY);

                      Line indented incorrectly; expected 8 spaces, found 9
                      Open

                               }

                      Space after opening parenthesis of function call prohibited
                      Open

                                                  $blocks1 = preg_split( '/\n(?=        \S)/', $block, -1, PREG_SPLIT_NO_EMPTY);

                      No space found after comma in function call
                      Open

                                                                         && preg_match('/^            (\S+) /',$block2, $ar_buf)) {

                      The variable $ar_buf is not named in camelCase.
                      Open

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 $ty_buf is not named in camelCase.
                      Open

                          private function _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 $ty_buf is not named in camelCase.
                      Open

                          private function _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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

                          protected function prtconf()
                          {
                              if ($this->_prtconf === null) {
                                  $this->_prtconf = array();
                                  if (CommonFunctions::executeProgram('prtconf', '-v', $buf, PSI_DEBUG) && ($buf!="")) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 $ty_buf is not named in camelCase.
                      Open

                          private function _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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

                          protected function _processes()
                          {
                              if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                                  $processes['*'] = 0;

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 $id_buf is not named in camelCase.
                      Open

                          private function _distro()
                          {
                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
                                  $this->sys->setDistribution(trim($buf));
                                  $list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 $ty_buf is not named in camelCase.
                      Open

                          private function _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 $ty_buf is not named in camelCase.
                      Open

                          private function _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 $id_buf is not named in camelCase.
                      Open

                          private function _distro()
                          {
                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
                                  $this->sys->setDistribution(trim($buf));
                                  $list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);

                      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_buf2 is not named in camelCase.
                      Open

                          private function _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 $ty_buf is not named in camelCase.
                      Open

                          private function _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _filesystems()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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 _network()
                          {
                              if (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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

                          protected function _processes()
                          {
                              if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                                  $processes['*'] = 0;

                      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 _pci is not named in camelCase.
                      Open

                          protected function _pci()
                          {
                              $prtconf = $this->prtconf();
                              if ((count($prtconf)>1) && isset($prtconf['pci'])) {
                                  foreach ($prtconf['pci'] as $prt) {

                      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 _kstat is not named in camelCase.
                      Open

                          private function _kstat($key)
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d '.$key, $m, PSI_DEBUG) && ($m!=="")) {
                                  list($key, $value) = preg_split("/\t/", $m, 2);
                      
                      

                      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

                          protected function _processes()
                          {
                              if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
                                  $processes['*'] = 0;

                      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()
                          {
                              if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
                                  $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
                                  for ($cpu=0; $cpu < $cpuc; $cpu++) {

                      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 _loadavg is not named in camelCase.
                      Open

                          private function _loadavg()
                          {
                              $load1 = $this->_kstat('unix:0:system_misc:avenrun_1min');
                              $load5 = $this->_kstat('unix:0:system_misc:avenrun_5min');
                              $load15 = $this->_kstat('unix:0:system_misc:avenrun_15min');

                      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()
                          {
                              $pagesize = $this->_kstat('unix:0:seg_cache:slab_size');
                              $this->sys->setMemTotal($this->_kstat('unix:0:system_pages:pagestotal') * $pagesize);
                              $this->sys->setMemUsed($this->_kstat('unix:0:system_pages:pageslocked') * $pagesize);

                      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()
                          {
                              if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
                                  $df = preg_replace('/\n\s/m', ' ', $df);
                                  $mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);

                      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 (CommonFunctions::executeProgram('netstat', '-ni | awk \'(NF ==10){print;}\'', $netstat, PSI_DEBUG)) {
                                  $lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
                                  foreach ($lines as $line) {

                      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()
                          {
                              if (CommonFunctions::rfts('/etc/release', $buf, 1, 4096, false) && (trim($buf)!="")) {
                                  $this->sys->setDistribution(trim($buf));
                                  $list = @parse_ini_file(PSI_APP_ROOT."/data/distros.ini", true);

                      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 _kernel is not named in camelCase.
                      Open

                          private function _kernel()
                          {
                              if (CommonFunctions::executeProgram('uname', '-s', $os, PSI_DEBUG) && ($os!="")) {
                                  if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {
                                      $os.=' '.$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 _uptime is not named in camelCase.
                      Open

                          private function _uptime()
                          {
                              $this->sys->setUptime(time() - $this->_kstat('unix:0:system_misc:boot_time'));
                          }

                      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