Development Setup¶
-
Install Dependencies:
-
Start Development Environment (if using Docker):
-
Run Tests to ensure everything is working:
-
Check Code Standards:
Code Style and Standards¶
Automated Checks¶
Before submitting your PR, ensure all checks pass:
# Check code style
composer cs
# Fix code style automatically
composer cs:fix
# Run static analysis
composer stan
# Run all checks
composer check
Manual Standards¶
- Variable Naming: Use descriptive names
- Good:
$clientIpAddress,$rateLimitWindow -
Bad:
$ip,$rlw -
Method Length: Keep methods focused and short (under 20 lines when possible)
-
Class Responsibility: Follow Single Responsibility Principle
-
Error Handling: Always handle edge cases and potential errors