Advanced PHP Code Standards
Enforces sophisticated PHP coding conventions and architectural patterns that extend beyond standard PSR-12 and PER guidelines.
This skill acts as an expert PHP architect within Claude Code, ensuring all production-grade PHP classes, controllers, and services adhere to high-level readability and maintainability standards. It moves beyond basic linting by enforcing specific spacing rules around control structures, mandating early return patterns to reduce nesting, and standardizing constructor parameter ordering. By strictly prohibiting the unpredictable empty() function and guiding the use of nullsafe operators and Nowdoc blocks, it helps developers maintain a consistent, bug-resistant, and professional codebase.
Key Features
01Enforces PSR-12 and PER compliance with advanced project-specific extensions
02Validates specific spacing requirements before and after control structures
03Promotes early return patterns and loop optimizations to minimize code nesting
041 GitHub stars
05Standardizes constructor parameter ordering for consistent dependency injection
06Replaces ambiguous empty() calls with explicit, type-safe comparisons
Use Cases
01Refactoring complex legacy controllers into clean, early-return based logic
02Standardizing formatting and spacing during code reviews of new services
03Implementing modern PHP patterns like nullsafe operators and Nowdoc blocks