UPSDevice
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class UPSDevice
{
/**
* name of the ups
*
The class UPSDevice has 16 fields. Consider redesigning UPSDevice to keep the number of fields under 15. Open
class UPSDevice
{
/**
* name of the ups
*
- 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
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class UPSDevice
- Exclude checks
The property $_status is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_lineVoltage is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_temperatur is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 UPSDevice
{
/**
* name of the ups
*
- 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 $_batterCharge is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_name is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_mode is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_lastOutageFinish is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_model is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_startTime is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_batteryVoltage is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_timeLeft is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_outages is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_lastOutage is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_lineFrequency is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 $_batteryDate is not named in camelCase. Open
class UPSDevice
{
/**
* name of the ups
*
- 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 "$_model" should not be prefixed with an underscore to indicate visibility Open
private $_model = "";
- Exclude checks
Property name "$_lastOutageFinish" should not be prefixed with an underscore to indicate visibility Open
private $_lastOutageFinish = null;
- Exclude checks
Property name "$_outages" should not be prefixed with an underscore to indicate visibility Open
private $_outages = null;
- Exclude checks
Property name "$_lineVoltage" should not be prefixed with an underscore to indicate visibility Open
private $_lineVoltage = null;
- Exclude checks
Property name "$_lineFrequency" should not be prefixed with an underscore to indicate visibility Open
private $_lineFrequency = null;
- Exclude checks
Property name "$_batteryDate" should not be prefixed with an underscore to indicate visibility Open
private $_batteryDate = null;
- Exclude checks
Property name "$_batteryVoltage" should not be prefixed with an underscore to indicate visibility Open
private $_batteryVoltage = null;
- Exclude checks
Property name "$_lastOutage" should not be prefixed with an underscore to indicate visibility Open
private $_lastOutage = null;
- Exclude checks
Property name "$_startTime" should not be prefixed with an underscore to indicate visibility Open
private $_startTime = "";
- Exclude checks
Property name "$_name" should not be prefixed with an underscore to indicate visibility Open
private $_name = "";
- Exclude checks
Property name "$_mode" should not be prefixed with an underscore to indicate visibility Open
private $_mode = "";
- Exclude checks
Property name "$_temperatur" should not be prefixed with an underscore to indicate visibility Open
private $_temperatur = null;
- Exclude checks
Property name "$_timeLeft" should not be prefixed with an underscore to indicate visibility Open
private $_timeLeft = null;
- Exclude checks
Property name "$_batterCharge" should not be prefixed with an underscore to indicate visibility Open
private $_batterCharge = null;
- Exclude checks
Property name "$_status" should not be prefixed with an underscore to indicate visibility Open
private $_status = "";
- Exclude checks
Property name "$_load" should not be prefixed with an underscore to indicate visibility Open
private $_load = null;
- 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