In plain English: Class names (and by extension interfaces, traits, and enums) should start with an uppercase letter (PascalCase / StudlyCase).
Why it matters: PSR-4 autoloading and PHP standards convention rely on class names starting with an uppercase letter to distinguish class references from functions or variables. It keeps the codebase consistent and predictable.
class paymentProcessor {
// ...
}
class PaymentProcessor {
// ...
}
is_uppercase()).PaymentProcessor, UserRepository, etc.).PaymentProcessor.php).E0005 has no configuration options and is enabled by default.
Functions and variables are camelCase (getUser). Classes are PascalCase (UserProcessor). Always capitalize your class names!