fix
Run rector, php-cs-fixer, and phpstan; fix what static analysis reports
SKILL.md.claude/skills/fix/SKILL.md
GitHubFix Code Style
PHP files edited during a session are auto-formatted by the PostToolUse hook. Use this for a full sweep or when phpstan is failing.
Instructions
Auto-fix:
composer fix # rector + php-cs-fixerReview what rector changed — it applies dead-code and code-quality sets and can be aggressive. Read the diff before keeping it:
git diffStatic analysis:
composer phpstanFix each phpstan error at the source. Never silence a real type problem with
@phpstan-ignore.Error Fix Missing return type Add it, voidincludedarraywithout shape@param list<int>/@return array<string, mixed>Possibly null Early return, or narrow the type Unknown Eloquent magic Larastan usually knows it — check the model's @propertydocblockVerify nothing broke:
composer test
Checklist for new files
declare(strict_types=1);presentfinalunless inheritance is used,readonlywhere immutable- Constructor property promotion, all params typed
- Interface in
Domain/, implementation inApplication/orInfrastructure/