This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/config/cursor/rules/php-style.mdc
T
2026-07-26 11:45:12 +02:00

13 lines
469 B
Plaintext

---
alwaysApply: false
---
# PHP Code Style
- Follow PSR-12 strictly; run php-cs-fixer or PHP_CodeSniffer on commit.
- Enable strict_types=1 in all files.
- Use typed properties/params/returns; avoid mixed unless documented.
- One class per file; namespaces match directory structure.
- Limit line length to 120; prefer early returns to reduce nesting.
- Prefer short array syntax []; no Yoda conditions.
- Use null coalesce (??) and nullsafe (?->) where appropriate.