Firesphere/silverstripe-csp-headers

View on GitHub
src/Admins/SRIAdmin.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused private fields such as '$menu_title'.
Open

    private static $menu_title = 'SRI & CSP';
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

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

Avoid unused private fields such as '$menu_icon_class'.
Open

    private static $menu_icon_class = 'font-icon-lock';
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

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

Avoid unused private fields such as '$url_segment'.
Invalid

    private static $url_segment = 'sri-admin';
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

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

Avoid unused private fields such as '$managed_models'.
Invalid

    private static $managed_models = [
        SRI::class,
        CSPDomain::class,
    ];
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

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 $url_segment is not named in camelCase.
Invalid

class SRIAdmin extends ModelAdmin
{
    private static $managed_models = [
        SRI::class,
        CSPDomain::class,
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

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 $managed_models is not named in camelCase.
Invalid

class SRIAdmin extends ModelAdmin
{
    private static $managed_models = [
        SRI::class,
        CSPDomain::class,
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

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 $menu_icon_class is not named in camelCase.
Invalid

class SRIAdmin extends ModelAdmin
{
    private static $managed_models = [
        SRI::class,
        CSPDomain::class,
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

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 $menu_title is not named in camelCase.
Invalid

class SRIAdmin extends ModelAdmin
{
    private static $managed_models = [
        SRI::class,
        CSPDomain::class,
Severity: Minor
Found in src/Admins/SRIAdmin.php by phpmd

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

There are no issues that match your filters.

Category
Status