vindi/vindi-woocommerce

View on GitHub
src/utils/AbstractInstance.php

Summary

Maintainability
A
0 mins
Test Coverage

The property $_instance is not named in camelCase.
Open

abstract class AbstractInstance
{

    protected static $_instance = null;

Severity: Minor
Found in src/utils/AbstractInstance.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

Property name "$_instance" should not be prefixed with an underscore to indicate visibility
Open

    protected static $_instance = null;

The closing brace for the class must go on the next line after the body
Open

}

Spaces must be used to indent lines; tabs are not allowed
Open

    public static function instance()

Spaces must be used to indent lines; tabs are not allowed
Open

        }

Spaces must be used to indent lines; tabs are not allowed
Open

    protected static $_instance = null;

Spaces must be used to indent lines; tabs are not allowed
Open

    {

Spaces must be used to indent lines; tabs are not allowed
Open

        if (is_null(static::$_instance)) {

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function __construct(){}

Spaces must be used to indent lines; tabs are not allowed
Open

        return static::$_instance;

Spaces must be used to indent lines; tabs are not allowed
Open

            static::$_instance = new static;

Spaces must be used to indent lines; tabs are not allowed
Open

    }

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function __clone(){}

Opening brace should be on a new line
Open

    protected function __clone(){}

Closing brace must be on a line by itself
Open

    protected function __clone(){}

Opening brace should be on a new line
Open

    protected function __construct(){}

Closing brace must be on a line by itself
Open

    protected function __construct(){}

There are no issues that match your filters.

Category
Status