XoopsModules25x/xoopsinfo

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

Summary

Maintainability
F
1 wk
Test Coverage

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

    protected function scsi()
    {
        foreach ($this->readdmesg() as $line) {
            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                $dev = new HWDevice();
Severity: Minor
Found in phpsysinfo/includes/os/class.BSDCommon.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 ide has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
Open

    protected function ide()
    {
        foreach ($this->readdmesg() as $line) {
            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                $dev = new HWDevice();
Severity: Minor
Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    protected function cpuinfo()
    {
        $dev = new CpuDevice();

        if (PSI_OS == "NetBSD") {
Severity: Minor
Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 6 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.BSDCommon.inc.php has 412 lines of code (exceeds 250 allowed). Consider refactoring.
Open

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

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

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

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    abstract class BSDCommon extends OS
    {
        /**
         * content of the syslog
         *

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

        protected function memory()
        {
            if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                // I should probably add some version checking here, but for now
    Severity: Minor
    Found in phpsysinfo/includes/os/class.BSDCommon.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 ide has 62 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function ide()
        {
            foreach ($this->readdmesg() as $line) {
                if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                    $dev = new HWDevice();
    Severity: Major
    Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 2 hrs to fix

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

          protected function scsi()
          {
              foreach ($this->readdmesg() as $line) {
                  if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                      $dev = new HWDevice();
      Severity: Major
      Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 2 hrs to fix

        BSDCommon has 22 functions (exceeds 20 allowed). Consider refactoring.
        Open

        abstract class BSDCommon extends OS
        {
            /**
             * content of the syslog
             *
        Severity: Minor
        Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 2 hrs to fix

          Method cpuinfo has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function cpuinfo()
              {
                  $dev = new CpuDevice();
          
                  if (PSI_OS == "NetBSD") {
          Severity: Minor
          Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 1 hr to fix

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

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

              Method memory has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function memory()
                  {
                      if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                          // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                          // I should probably add some version checking here, but for now
              Severity: Minor
              Found in phpsysinfo/includes/os/class.BSDCommon.inc.php - About 1 hr to fix

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

                    protected function pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_buf)) {
                Severity: Minor
                Found in phpsysinfo/includes/os/class.BSDCommon.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 readdmesg has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function readdmesg()
                    {
                        if ($this->_dmesg === null) {
                            if ((PSI_OS != "Darwin") && (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot', $buf))) {  // Once again but with debug
                                $parts = preg_split("/rebooting|Uptime/", $buf, -1, PREG_SPLIT_NO_EMPTY);
                Severity: Minor
                Found in phpsysinfo/includes/os/class.BSDCommon.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

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

                    protected 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.BSDCommon.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 cpuinfo() has an NPath complexity of 800. The configured NPath complexity threshold is 200.
                Open

                    protected function cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

                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 ide() has an NPath complexity of 237. The configured NPath complexity threshold is 200.
                Open

                    protected function ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi() has an NPath complexity of 297. The configured NPath complexity threshold is 200.
                Open

                    protected function scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

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

                    protected function ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

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

                    protected function memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

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

                    protected function scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

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

                    protected function cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

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

                    protected function pciconf()
                    {
                        $arrResults = array();
                        $intS = 0;
                        if (CommonFunctions::executeProgram("pciconf", "-lv", $strBuf, PSI_DEBUG)) {

                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

                                $parts = preg_split("/rebooting|Uptime/", $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 '$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 '$buf' which will lead to PHP notices.
                Open

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

                            if ((PSI_OS != "Darwin") && (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot', $buf))) {  // Once again but with 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 '$vmstat' which will lead to PHP notices.
                Open

                        if (CommonFunctions::executeProgram('vmstat', '', $vmstat, 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 '$swapstat' which will lead to PHP notices.
                Open

                                $lines = preg_split("/\n/", $swapstat, -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 ((PSI_OS != "Darwin") && (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot', $buf))) {  // Once again but with 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 '$strBuf' which will lead to PHP notices.
                Open

                        if (CommonFunctions::executeProgram("pciconf", "-lv", $strBuf, 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 '$swapstat' which will lead to PHP notices.
                Open

                            if (((PSI_OS == 'OpenBSD' || PSI_OS == 'NetBSD') && CommonFunctions::executeProgram('swapctl', '-l -k', $swapstat, PSI_DEBUG)) || CommonFunctions::executeProgram('swapinfo', '-k', $swapstat, 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 '$buf' which will lead to PHP notices.
                Open

                            if ((PSI_OS != "Darwin") && (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot', $buf))) {  // Once again but with 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 '$vmstat' which will lead to PHP notices.
                Open

                            $lines = preg_split("/\n/", $vmstat, -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 '$swapstat' which will lead to PHP notices.
                Open

                            if (((PSI_OS == 'OpenBSD' || PSI_OS == 'NetBSD') && CommonFunctions::executeProgram('swapctl', '-l -k', $swapstat, PSI_DEBUG)) || CommonFunctions::executeProgram('swapinfo', '-k', $swapstat, 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 '$hnm' which will lead to PHP notices.
                Open

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

                UndefinedVariable

                Since: 2.8.0

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

                Example

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

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

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

                            $arrBlocks = preg_split("/\n\S/", $strBuf, -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 '$result' which will lead to PHP notices.
                Open

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

                            if (CommonFunctions::executeProgram('hostname', '', $buf, 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 '$result' which will lead to PHP notices.
                Open

                        if (CommonFunctions::executeProgram('uname', '-s', $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

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

                                $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                    $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

                Missing class import via use statement (line '573', column '36').
                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 '353', column '32').
                Open

                                    $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                    $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                    $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                    $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

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

                                    $dev = new HWDevice();

                MissingImport

                Since: 2.7.0

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

                Example

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

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

                Missing class import via use statement (line '599', column '32').
                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

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

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

                ElseExpression

                Since: 1.4.0

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

                Example

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

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

                The method grabkey 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

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

                        } else {
                            $pagesize = $this->grabkey('hw.pagesize');
                        }

                ElseExpression

                Since: 1.4.0

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

                Example

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

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

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

                        if (CommonFunctions::executeProgram('vmstat', '', $vmstat, 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 'memory'.
                Open

                            if (((PSI_OS == 'OpenBSD' || PSI_OS == 'NetBSD') && CommonFunctions::executeProgram('swapctl', '-l -k', $swapstat, PSI_DEBUG)) || CommonFunctions::executeProgram('swapinfo', '-k', $swapstat, 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 'readdmesg'.
                Open

                            if ((PSI_OS != "Darwin") && (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot', $buf))) {  // Once again but with 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 '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 'distro'.
                Open

                        if (CommonFunctions::executeProgram('uname', '-s', $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

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

                    protected function cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

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

                                            } else {
                                                $arrTemp[$intS] = trim($arrParts[2]);
                                                $vend = '';
                                            }

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

                            if ((PSI_OS != "Darwin") && (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot', $buf))) {  // Once again but with 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 assigning values to variables in if clauses and the like (line '279', column '17').
                Open

                    protected function cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

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

                                            } else {
                                                $finddev->setCapacity($ar_buf[2] * 1024 * 1024);
                                            }

                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 '449', column '53').
                Open

                    protected function pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_buf)) {

                IfStatementAssignment

                Since: 2.7.0

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

                Example

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

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

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

                            if (CommonFunctions::executeProgram('hostname', '', $buf, 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 'Parser' in method 'filesystems'.
                Open

                        $arrResult = Parser::df();

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

                        if (CommonFunctions::executeProgram('sysctl', "-n $key", $buf, 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 assigning values to variables in if clauses and the like (line '449', column '15').
                Open

                    protected function pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_buf)) {

                IfStatementAssignment

                Since: 2.7.0

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

                Example

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

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

                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('hostname', '', $buf, PSI_DEBUG)) {
                                $this->sys->setHostname($buf);
                            }
                        }

                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 'Parser' in method 'pci'.
                Open

                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {

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

                            if (((PSI_OS == 'OpenBSD' || PSI_OS == 'NetBSD') && CommonFunctions::executeProgram('swapctl', '-l -k', $swapstat, PSI_DEBUG)) || CommonFunctions::executeProgram('swapinfo', '-k', $swapstat, 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 cpuinfo uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                Open

                            } else {
                                if (preg_match("/ Origin| Features/", $line, $ar_buf)) {
                                    if (preg_match("/ Features2[ ]*=.*<(.*)>/", $line, $ar_buf)) {
                                        $feats = preg_split("/,/", strtolower(trim($ar_buf[1])), -1, PREG_SPLIT_NO_EMPTY);
                                        foreach ($feats as $feat) {

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

                        if (CommonFunctions::executeProgram("pciconf", "-lv", $strBuf, 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 memory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                Open

                            } else {
                                $this->sys->setMemFree($ar_buf[4] * $pagesize);
                            }

                ElseExpression

                Since: 1.4.0

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

                Example

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

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

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

                            } else {
                                $this->_dmesg = array();
                            }

                ElseExpression

                Since: 1.4.0

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

                Example

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

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

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

                    protected function loadavg()
                    {
                        $s = $this->grabkey('vm.loadavg');
                        $s = preg_replace('/{ /', '', $s);
                        $s = preg_replace('/ }/', '', $s);

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

                                            } else {
                                                $dev->setCapacity($ar_buf[2] * 1024 * 1024);
                                            }

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

                            if ((PSI_OS != "Darwin") && (CommonFunctions::rfts('/var/run/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/log/dmesg.boot', $buf, 0, 4096, false) || CommonFunctions::rfts('/var/run/dmesg.boot', $buf))) {  // Once again but with 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

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

                            } elseif (preg_match($this->_SCSIRegExp3, $line, $ar_buf)) {
                                /* duplication security */
                                $notwas = true;
                                foreach ($this->sys->getScsiDevices() as $finddev) {
                                    if ($notwas && (substr($finddev->getName(), 0, strpos($finddev->getName(), ': ')) == $ar_buf[1])) {
                Severity: Major
                Found in phpsysinfo/includes/os/class.BSDCommon.inc.php and 1 other location - About 7 hrs to fix
                phpsysinfo/includes/os/class.BSDCommon.inc.php on lines 511..533

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

                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

                            } elseif (preg_match('/^(ada[0-9]+): Serial Number (.*)/', $line, $ar_buf)) {
                                /* duplication security */
                                $notwas = true;
                                foreach ($this->sys->getIdeDevices() as $finddev) {
                                    if ($notwas && (substr($finddev->getName(), 0, strpos($finddev->getName(), ': ')) == $ar_buf[1])) {
                Severity: Major
                Found in phpsysinfo/includes/os/class.BSDCommon.inc.php and 1 other location - About 7 hrs to fix
                phpsysinfo/includes/os/class.BSDCommon.inc.php on lines 364..386

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

                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

                                    if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                                        if (isset($ar_buf[3]) && ($ar_buf[3]==="G")) {
                                                $dev->setCapacity($ar_buf[2] * 1024 * 1024 * 1024);
                                            } else {
                                                $dev->setCapacity($ar_buf[2] * 1024 * 1024);
                Severity: Minor
                Found in phpsysinfo/includes/os/class.BSDCommon.inc.php and 1 other location - About 30 mins to fix
                phpsysinfo/includes/os/class.BSDCommon.inc.php on lines 341..347

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

                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

                                        if (defined('PSI_SHOW_DEVICES_INFOS') && PSI_SHOW_DEVICES_INFOS) {
                                            if (isset($ar_buf[3]) && ($ar_buf[3]==="G")) {
                                                $finddev->setCapacity($ar_buf[2] * 1024 * 1024 * 1024);
                                            } else {
                                                $finddev->setCapacity($ar_buf[2] * 1024 * 1024);
                Severity: Minor
                Found in phpsysinfo/includes/os/class.BSDCommon.inc.php and 1 other location - About 30 mins to fix
                phpsysinfo/includes/os/class.BSDCommon.inc.php on lines 355..361

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

                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

                abstract class BSDCommon extends OS

                Avoid variables with short names like $s. Configured minimum length is 3.
                Open

                        $s = $this->grabkey('vm.loadavg');

                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

                The property $_dmesg is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                CamelCasePropertyName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name attributes.

                Example

                class ClassName {
                    protected $property_name;
                }

                Source

                The property $_CPURegExp1 is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                CamelCasePropertyName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name attributes.

                Example

                class ClassName {
                    protected $property_name;
                }

                Source

                The property $_SCSIRegExp1 is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                CamelCasePropertyName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name attributes.

                Example

                class ClassName {
                    protected $property_name;
                }

                Source

                The property $_SCSIRegExp2 is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                CamelCasePropertyName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name attributes.

                Example

                class ClassName {
                    protected $property_name;
                }

                Source

                The property $_SCSIRegExp3 is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                CamelCasePropertyName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name attributes.

                Example

                class ClassName {
                    protected $property_name;
                }

                Source

                The property $_PCIRegExp1 is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                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 $s. Configured minimum length is 3.
                Open

                        $s = $this->grabkey('kern.version');

                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

                Avoid variables with short names like $a. Configured minimum length is 3.
                Open

                        $a = preg_split('/:/', $s);

                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

                The property $_CPURegExp2 is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                CamelCasePropertyName

                Since: 0.2

                It is considered best practice to use the camelCase notation to name attributes.

                Example

                class ClassName {
                    protected $property_name;
                }

                Source

                The property $_PCIRegExp2 is not named in camelCase.
                Open

                abstract class BSDCommon extends OS
                {
                    /**
                     * content of the syslog
                     *

                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 $fd. Configured minimum length is 3.
                Open

                            if ($fd = $this->grabkey('kern.cp_time')) {

                ShortVariable

                Since: 0.2

                Detects when a field, local, or parameter has a very short name.

                Example

                class Something {
                    private $q = 15; // VIOLATION - Field
                    public static function main( array $as ) { // VIOLATION - Formal
                        $r = 20 + $this->q; // VIOLATION - Local
                        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                            $r += $this->q;
                        }
                    }
                }

                Source https://phpmd.org/rules/naming.html#shortvariable

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

                    private $_SCSIRegExp2 = "//";

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

                    private $_PCIRegExp2 = "//";

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

                    private $_SCSIRegExp3 = "//";

                Space found before second semicolon of FOR loop
                Open

                        for ($ncpu ; $ncpu > 0 ; $ncpu--) {

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

                    private $_CPURegExp2 = "//";

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

                    private $_PCIRegExp1 = "//";

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

                    private $_CPURegExp1 = "//";

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

                    private $_SCSIRegExp1 = "//";

                Space found before first semicolon of FOR loop
                Open

                        for ($ncpu ; $ncpu > 0 ; $ncpu--) {

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

                    private $_dmesg = null;

                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 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 (is_null($ncpu) || (trim($ncpu) == "") || (!($ncpu >= 1)))

                Inline control structures are not allowed
                Open

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

                Line exceeds 120 characters; contains 151 characters
                Open

                                    if (preg_match("/\sclass=0x([a-fA-F0-9]{4})[a-fA-F0-9]{2}\s.*\schip=0x([a-fA-F0-9]{4})([a-fA-F0-9]{4})\s/", $strLine, $arrParts)) {

                Inline control structures are not allowed
                Open

                                } else break;

                Line exceeds 120 characters; contains 216 characters
                Open

                            if (((PSI_OS == 'OpenBSD' || PSI_OS == 'NetBSD') && CommonFunctions::executeProgram('swapctl', '-l -k', $swapstat, PSI_DEBUG)) || CommonFunctions::executeProgram('swapinfo', '-k', $swapstat, PSI_DEBUG)) {

                Inline control structures are not allowed
                Open

                                    if (strpos($finddev->getName(), ': ') !== false)

                Inline control structures are not allowed
                Open

                                    if (strpos($finddev->getName(), ': ') !== false)

                Line indented incorrectly; expected 24 spaces, found 28
                Open

                                            }

                Line indented incorrectly; expected 24 spaces, found 28
                Open

                                            } else {

                Closing brace indented incorrectly; expected 15 spaces, found 16
                Open

                                }

                Closing brace indented incorrectly; expected 24 spaces, found 28
                Open

                                            } else {

                Line indented incorrectly; expected 16 spaces, found 15
                Open

                               if (preg_match($this->_CPURegExp1, $line, $ar_buf)) {

                Line indented incorrectly; expected at least 16 spaces, found 15
                Open

                               $dev->setCpuSpeed(round($cpuspeed / 1000000));

                Line indented incorrectly; expected at least 16 spaces, found 15
                Open

                               $dev->setModel($model);

                The variable $ar_buf is not named in camelCase.
                Open

                    protected function cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 usb()
                    {
                        foreach ($this->readdmesg() as $line) {
                //            if (preg_match('/^(ugen[0-9\.]+): <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                //                    $dev->setName($ar_buf[1].": ".$ar_buf[2]);

                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 pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 usb()
                    {
                        foreach ($this->readdmesg() as $line) {
                //            if (preg_match('/^(ugen[0-9\.]+): <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                //                    $dev->setName($ar_buf[1].": ".$ar_buf[2]);

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 cpuinfo()
                    {
                        $dev = new CpuDevice();
                
                        if (PSI_OS == "NetBSD") {

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 scsi()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match($this->_SCSIRegExp1, $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 pci()
                    {
                        if ((!$results = Parser::lspci(false)) && (!$results = $this->pciconf())) {
                            foreach ($this->readdmesg() as $line) {
                                if (preg_match($this->_PCIRegExp1, $line, $ar_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 ide()
                    {
                        foreach ($this->readdmesg() as $line) {
                            if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
                                $dev = new HWDevice();

                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 memory()
                    {
                        if (PSI_OS == 'FreeBSD' || PSI_OS == 'OpenBSD') {
                            // vmstat on fbsd 4.4 or greater outputs kbytes not hw.pagesize
                            // I should probably add some version checking here, but for now

                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

                There are no issues that match your filters.

                Category
                Status