MMail
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Create a ticketCreate a ticket
The property $m_dDate is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 $m_bIsSeen is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 $to. Configured minimum length is 3. Open
public function setTo($to)
- Read upRead up
- Create a ticketCreate a ticket
- 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 $m_sFrom is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 $m_sTo is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 parameter $p_sEmail is not named in camelCase. Open
public static function isMailAddressValid($p_sEmail)
{
return (preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $p_sEmail));
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $m_sSubject is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 $m_bIsDraft is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 $m_bIsDeleted is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 $m_lMessage is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 $m_bIsAnswered is not named in camelCase. Open
class MMail extends MWebfile
{
private $m_sFrom;
private $m_sTo;
- Read upRead up
- Create a ticketCreate a ticket
- 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 variable $p_sEmail is not named in camelCase. Open
public static function isMailAddressValid($p_sEmail)
{
return (preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $p_sEmail));
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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();
}
}