System
has 65 functions (exceeds 20 allowed). Consider refactoring. Open
class System
{
/**
* name of the host where phpSysInfo runs
*
File class.System.inc.php
has 386 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* System TO class
*
* PHP version 5
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
*
- Exclude checks
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)) {
- Read upRead up
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) {
- Read upRead up
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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)) {
- Read upRead up
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;
Avoid too many return
statements within this method. Open
return null;
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);
- Read upRead up
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
*
- Exclude checks
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)) {
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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);
}
- Read upRead up
- Exclude checks
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);
}
- Read upRead up
- Exclude checks
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();
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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;
}
- Read upRead up
- Exclude checks
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
- Exclude checks
The property $_machine is not named in camelCase. Open
class System
{
/**
* name of the host where phpSysInfo runs
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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)
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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
*
- Read upRead up
- Exclude checks
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";
- Exclude checks
Property name "$_diskDevices" should not be prefixed with an underscore to indicate visibility Open
private $_diskDevices = array();
- Exclude checks
Property name "$_memFree" should not be prefixed with an underscore to indicate visibility Open
private $_memFree = 0;
- Exclude checks
Property name "$_load" should not be prefixed with an underscore to indicate visibility Open
private $_load = "";
- Exclude checks
Property name "$_ideDevices" should not be prefixed with an underscore to indicate visibility Open
private $_ideDevices = array();
- Exclude checks
Property name "$_i2cDevices" should not be prefixed with an underscore to indicate visibility Open
private $_i2cDevices = array();
- Exclude checks
Property name "$_users" should not be prefixed with an underscore to indicate visibility Open
private $_users = 0;
- Exclude checks
Property name "$_memUsed" should not be prefixed with an underscore to indicate visibility Open
private $_memUsed = 0;
- Exclude checks
Property name "$_swapDevices" should not be prefixed with an underscore to indicate visibility Open
private $_swapDevices = array();
- Exclude checks
Property name "$_ip" should not be prefixed with an underscore to indicate visibility Open
private $_ip = "127.0.0.1";
- Exclude checks
Property name "$_scsiDevices" should not be prefixed with an underscore to indicate visibility Open
private $_scsiDevices = array();
- Exclude checks
Property name "$_tbDevices" should not be prefixed with an underscore to indicate visibility Open
private $_tbDevices = array();
- Exclude checks
Property name "$_loadPercent" should not be prefixed with an underscore to indicate visibility Open
private $_loadPercent = null;
- Exclude checks
Property name "$_memApplication" should not be prefixed with an underscore to indicate visibility Open
private $_memApplication = null;
- Exclude checks
Property name "$_nvmeDevices" should not be prefixed with an underscore to indicate visibility Open
private $_nvmeDevices = array();
- Exclude checks
Property name "$_memTotal" should not be prefixed with an underscore to indicate visibility Open
private $_memTotal = 0;
- Exclude checks
Property name "$_uptime" should not be prefixed with an underscore to indicate visibility Open
private $_uptime = 0;
- Exclude checks
Property name "$_cpus" should not be prefixed with an underscore to indicate visibility Open
private $_cpus = array();
- Exclude checks
Property name "$_memBuffer" should not be prefixed with an underscore to indicate visibility Open
private $_memBuffer = null;
- Exclude checks
Property name "$_processes" should not be prefixed with an underscore to indicate visibility Open
private $_processes = array();
- Exclude checks
Property name "$_usbDevices" should not be prefixed with an underscore to indicate visibility Open
private $_usbDevices = array();
- Exclude checks
Property name "$_machine" should not be prefixed with an underscore to indicate visibility Open
private $_machine = "";
- Exclude checks
Property name "$_pciDevices" should not be prefixed with an underscore to indicate visibility Open
private $_pciDevices = array();
- Exclude checks
Property name "$_hostname" should not be prefixed with an underscore to indicate visibility Open
private $_hostname = "localhost";
- Exclude checks
Property name "$_distributionIcon" should not be prefixed with an underscore to indicate visibility Open
private $_distributionIcon = "unknown.png";
- Exclude checks
Property name "$_netDevices" should not be prefixed with an underscore to indicate visibility Open
private $_netDevices = array();
- Exclude checks
Property name "$_memCache" should not be prefixed with an underscore to indicate visibility Open
private $_memCache = null;
- Exclude checks
Property name "$_distribution" should not be prefixed with an underscore to indicate visibility Open
private $_distribution = "Unknown";
- Exclude checks
Line exceeds 120 characters; contains 140 characters Open
return round(($this->_memBuffer + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
- Exclude checks
Line exceeds 120 characters; contains 193 characters Open
return round(($this->_memBuffer + $this->_memApplication + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentApplication() - $this->getMemPercentCache();
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
return round(($this->_memBuffer + $this->_memCache) / $this->_memTotal * 100) - $this->getMemPercentCache();
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
return round(($this->_memCache + $this->_memApplication) / $this->_memTotal * 100) - $this->getMemPercentApplication();
- Exclude checks
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
- Exclude checks
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
- Exclude checks