PHP

PHP

Made by DeepSource

Class method doesn't comply with PSR standards PHP-C1001

Style
Major

As per PSR-1, class methods must be declared in the camelCase.

It is recommended that you follow PSR standards while developing PHP applications so the code is consistent and can be easily maintained.

Bad practice

class User
{
    // invalid: class methods can't be defined in PascalCase
    public function GetUser(): array
    {
        // method implementation here
    }
}

Recommended

class User
{
    public function getUser(): array
    {
        // method implementation here
    }
}