What problem does it solve?
Ensures PHP code meets consistent quality standards and avoids “it looks correct” shortcuts by requiring strict typing, PSR-12 structure, modern language usage, and (when relevant) framework/tooling idioms.
Core Features & Use Cases
- Strict types enforcement: Requires
declare(strict_types=1) at the top of every PHP file to prevent silent type coercion.
- PSR-12 compliance checks: Verifies formatting and structural rules like indentation, whitespace, visibility, and brace style.
- Modern PHP feature guidance: Applies recommendations for PHP 8.0–8.2 language features (e.g., enums, readonly, match, null-safe operator, named arguments) when the topic is relevant.
- Framework idiom review (Laravel/Symfony): Applies idiomatic patterns for collections, Eloquent scopes, service container binding, Symfony DI attributes, and event dispatchers when framework signals are present.
- Tooling-aware quality review: Uses quality tool references (PHP-CS-Fixer, PHPStan, Psalm, Rector) to guide configuration and CI expectations when tooling signals appear.
Quick Start
Review my PHP code for quality by checking strict types, PSR-12 compliance, and relevant framework and static-analysis idioms.