php-best-practices

Installation
SKILL.md

PHP Best Practices

Priority: P1 (HIGH)

Structure

src/
├── {Domain}/             # e.g., Services, Repositories
└── Helpers/              # Pure functions/Traits

Implementation Guidelines

Coding Style (PSR Standards)

  • PSR-12: Enforce 4-space indentation and opening braces on same line for functions/methods.
  • Organization: One class per file; use statements follow namespace. Run PHP CS Fixer with PSR-12 preset.
  • Naming Conventions: Use PascalCase (UserService) for classes, camelCase (getUserById) for methods/variables, and SNAKE_CASE (MAX_RETRIES) for class constants.
Installs
1
GitHub Stars
521
First Seen
12 days ago
php-best-practices — hoangnguyen0403/agent-skills-standard