src/scope/Meta.php
Avoid unused private fields such as '$generic_num'. Open
Open
private static $generic_num = 0;
- Read upRead up
- Exclude checks
UnusedPrivateField
Since: 0.2
Detects when a private field is declared and/or assigned a value, but not used.
Example
class Something
{
private static $FOO = 2; // Unused
private $i = 5; // Unused
private $j = 6;
public function addOne()
{
return $this->j++;
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield
The property $generic_num is not named in camelCase. Open
Open
class Meta
{
const M_REF_COUNT = 'refcount';
const M_TYPE = 'type';
const M_LABEL = 'label'; // Implicit meta labels
- 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 $label_num is not named in camelCase. Open
Open
class Meta
{
const M_REF_COUNT = 'refcount';
const M_TYPE = 'type';
const M_LABEL = 'label'; // Implicit meta labels
- 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;
}