XoopsModules25x/xoopsinfo

View on GitHub
phpsysinfo/includes/to/class.System.inc.php

Summary

Maintainability
D
2 days
Test Coverage

System has 65 functions (exceeds 20 allowed). Consider refactoring.
Open

class System
{
    /**
     * name of the host where phpSysInfo runs
     *
Severity: Major
Found in phpsysinfo/includes/to/class.System.inc.php - About 1 day to fix

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

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

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

      class System
      {
          /**
           * name of the host where phpSysInfo runs
           *

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

          public function getMemPercentBuffer()
          {
              if ($this->_memBuffer !== null) {
                  if (($this->_memBuffer > 0) && ($this->_memTotal > 0)) {
                      if (($this->_memCache !== null) && ($this->_memCache > 0)) {
      Severity: Minor
      Found in phpsysinfo/includes/to/class.System.inc.php - About 2 hrs to fix

      Cognitive Complexity

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

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

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

      Further reading

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

          public static function removeDupsAndCount($arrDev)
          {
              $result = array();
              foreach ($arrDev as $dev) {
                  if (count($result) === 0) {
      Severity: Minor
      Found in phpsysinfo/includes/to/class.System.inc.php - About 1 hr to fix

      Cognitive Complexity

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

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

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

      Further reading

      The class System has 28 fields. Consider redesigning System to keep the number of fields under 15.
      Open

      class System
      {
          /**
           * name of the host where phpSysInfo runs
           *

      TooManyFields

      Since: 0.1

      Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

      Example

      class Person {
         protected $one;
         private $two;
         private $three;
         [... many more fields ...]
      }

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

      The class System has 65 public methods and attributes. Consider reducing the number of public items to less than 45.
      Open

      class System
      {
          /**
           * name of the host where phpSysInfo runs
           *

      ExcessivePublicCount

      Since: 0.1

      A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

      Example

      public class Foo {
          public $value;
          public $something;
          public $var;
          // [... more more public attributes ...]
      
          public function doWork() {}
          public function doMoreWork() {}
          public function doWorkAgain() {}
          // [... more more public methods ...]
      }

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

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

          public function getMemPercentCache()
          {
              if ($this->_memCache !== null) {
                  if (($this->_memCache > 0) && ($this->_memTotal > 0)) {
                      if (($this->_memApplication !== null) && ($this->_memApplication > 0)) {
      Severity: Minor
      Found in phpsysinfo/includes/to/class.System.inc.php - About 1 hr to fix

      Cognitive Complexity

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

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

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

      Further reading

      Avoid too many return statements within this method.
      Open

                      return 0;
      Severity: Major
      Found in phpsysinfo/includes/to/class.System.inc.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return null;
        Severity: Major
        Found in phpsysinfo/includes/to/class.System.inc.php - About 30 mins to fix

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

              public function getMemPercentApplication()
              {
                  if ($this->_memApplication !== null) {
                      if (($this->_memApplication > 0) && ($this->_memTotal > 0)) {
                          return round($this->_memApplication / $this->_memTotal * 100);
          Severity: Minor
          Found in phpsysinfo/includes/to/class.System.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 class System has 1182 lines of code. Current threshold is 1000. Avoid really long classes.
          Open

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

              public function getMemPercentBuffer()
              {
                  if ($this->_memBuffer !== null) {
                      if (($this->_memBuffer > 0) && ($this->_memTotal > 0)) {
                          if (($this->_memCache !== null) && ($this->_memCache > 0)) {

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

                      } else {
                          return 0;
                      }

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

                  } else {
                      return null;
                  }

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

                      } else {
                          return 0;
                      }

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

                      } else {
                          $found = false;
                          foreach ($result as $tmp) {
                              if ($dev->equals($tmp)) {
                                  $tmp->setCount($tmp->getCount() + 1);

          ElseExpression

          Since: 1.4.0

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

          Example

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

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

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

                  } else {
                      return null;
                  }

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

                  } else {
                      return null;
                  }

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

                  } else {
                      return 0;
                  }

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

                      } else {
                          return 0;
                      }

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

                      } else {
                          return 0;
                      }

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

                  } else {
                      return null;
                  }

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

                          } else {
                              return round($this->_memCache / $this->_memTotal * 100);
                          }

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

                          } else {
                              return round($this->_memBuffer / $this->_memTotal * 100);
                          }

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

                              } else {
                                  return round(($this->_memBuffer + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentCache();
                              }

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

                  } else {
                      return null;
                  }

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

                  } else {
                      return null;
                  }

          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

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

          class System

          The property $_machine is not named in camelCase.
          Open

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

          CamelCasePropertyName

          Since: 0.2

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

          Example

          class ClassName {
              protected $property_name;
          }

          Source

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

              public function setIp($ip)

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

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

          class System
          {
              /**
               * name of the host where phpSysInfo runs
               *

          CamelCasePropertyName

          Since: 0.2

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

          Example

          class ClassName {
              protected $property_name;
          }

          Source

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

              private $_kernel = "Unknown";

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

              private $_diskDevices = array();

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

              private $_memFree = 0;

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

              private $_load = "";

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

              private $_ideDevices = array();

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

              private $_i2cDevices = array();

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

              private $_users = 0;

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

              private $_memUsed = 0;

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

              private $_swapDevices = array();

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

              private $_ip = "127.0.0.1";

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

              private $_scsiDevices = array();

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

              private $_tbDevices = array();

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

              private $_loadPercent = null;

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

              private $_memApplication = null;

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

              private $_nvmeDevices = array();

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

              private $_memTotal = 0;

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

              private $_uptime = 0;

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

              private $_cpus = array();

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

              private $_memBuffer = null;

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

              private $_processes = array();

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

              private $_usbDevices = array();

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

              private $_machine = "";

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

              private $_pciDevices = array();

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

              private $_hostname = "localhost";

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

              private $_distributionIcon = "unknown.png";

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

              private $_netDevices = array();

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

              private $_memCache = null;

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

              private $_distribution = "Unknown";

          Line exceeds 120 characters; contains 140 characters
          Open

                              return round(($this->_memBuffer + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();

          Line exceeds 120 characters; contains 193 characters
          Open

                                  return round(($this->_memBuffer + $this->_memApplication + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentApplication() - $this->getMemPercentCache();

          Line exceeds 120 characters; contains 132 characters
          Open

                                  return round(($this->_memBuffer + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentCache();

          Line exceeds 120 characters; contains 139 characters
          Open

                              return round(($this->_memCache + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();

          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

          There are no issues that match your filters.

          Category
          Status