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.
class User
{
// invalid: class methods can't be defined in PascalCase
public function GetUser(): array
{
// method implementation here
}
}
class User
{
public function getUser(): array
{
// method implementation here
}
}