sebastianmonzel/webfiles-framework-php

View on GitHub
source/core/datastore/types/mail/MMail.php

Summary

Maintainability
A
2 hrs
Test Coverage
F
0%

MMail has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

class MMail extends MWebfile
{

    private $m_sFrom;
    private $m_sTo;
Severity: Minor
Found in source/core/datastore/types/mail/MMail.php - About 2 hrs to fix

The property $m_dDate is not named in camelCase.
Open

class MMail extends MWebfile
{

    private $m_sFrom;
    private $m_sTo;

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;

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)

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;

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;

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));
    }

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;

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;

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;

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;

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;

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));
    }

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();
    }
}

Source

There are no issues that match your filters.

Category
Status