RebelCode/wp-admin-page

View on GitHub
src/AbstractPage.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    protected function _setId($id)
Severity: Minor
Found in src/AbstractPage.php by phpmd

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

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    protected $id;
Severity: Minor
Found in src/AbstractPage.php by phpmd

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 method _construct is not named in camelCase.
Open

    protected function _construct()
    {
    }
Severity: Minor
Found in src/AbstractPage.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _getTitle is not named in camelCase.
Open

    protected function _getTitle()
    {
        return $this->title;
    }
Severity: Minor
Found in src/AbstractPage.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _getId is not named in camelCase.
Open

    protected function _getId()
    {
        return $this->id;
    }
Severity: Minor
Found in src/AbstractPage.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _getContent is not named in camelCase.
Open

    abstract protected function _getContent();
Severity: Minor
Found in src/AbstractPage.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _setId is not named in camelCase.
Open

    protected function _setId($id)
    {
        $this->id = $id;

        return $this;
Severity: Minor
Found in src/AbstractPage.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _setTitle is not named in camelCase.
Open

    protected function _setTitle($title)
    {
        $this->title = $title;

        return $this;
Severity: Minor
Found in src/AbstractPage.php by phpmd

CamelCaseMethodName

Since: 0.2

It is considered best practice to use the camelCase notation to name methods.

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status