cline/coding-standard
Opinionated PHP-CS-Fixer + Rector presets for modern PHP 8.4+ projects. Enforces strict coding standards, naming conventions, and architecture rules, with custom fixers, PHPDoc wrapping, and optional legacy tag/header rules for incremental adoption.
@author tag removal) to accelerate PR reviews and reduce cognitive load. Ideal for teams prioritizing developer experience (DX).@param/@return tags)..env) requiring custom handling.*"This package standardizes our PHP codebase to Laravel’s modern best practices, reducing bugs and onboarding time. By automating formatting (e.g., docblocks, naming conventions), we’ll:
- Cut PR review time by 30%+—engineers spend less time debating style.
- Future-proof our code for PHP 8.4+ and Laravel’s evolving standards.
- Scale effortlessly across repositories, ensuring consistency for teams and contractors. It’s a low-risk, high-reward investment: a one-time setup for long-term maintainability. Similar tools (like Prettier for JavaScript) are industry standards—this does the same for PHP."*
*"This is a preconfigured PHP-CS-Fixer with Laravel-friendly presets (e.g., PHPDoc formatting, architecture rules). Key benefits:
- Zero maintenance: Drop-in replacement for
php-cs-fixerwith minimal setup.- Enforces best practices:
- Removes legacy tags (
@author,@version) to reduce noise.- Wraps docblocks at 80 columns for readability.
- Includes architecture-focused rules (e.g., naming conventions).
- Scalable: Ideal for monorepos or shared libraries. Recommendation: Pilot in 1–2 repos, then enforce via CI. Pair with a deprecation timeline for legacy code (e.g., 6–12 months)."*
*"This package saves hours of manual formatting and style debates. Here’s how to use it:
- Install:
composer require cline/coding-standard --dev- Run fixes:
vendor/bin/php-cs-fixer fix --rules=@cline-standard- Enforce in CI: Add a step to check code before merging (e.g., GitHub Actions).
- Why it’s great:
- PHPDoc presets: Auto-formats docblocks (e.g.,
@paramtags) to 80 columns.- Architecture rules: Enforces consistent naming (e.g.,
snake_casefor DB columns).- Legacy cleanup: Removes
@author/@versiontags by default (opt-in available).- Pro tip: Use
--dry-runto preview changes before applying. No more arguing about spaces vs. tabs—just run the fixer and move on."*
*"This package ensures consistent PHPDoc formatting and removes legacy metadata (
@author,@version), improving auditability. Key benefits:
- Standardized documentation: Ensures
@param/@returntags are formatted and present.- Reduced technical debt: Automates compliance with modern PHP/Laravel standards.
- CI/CD integration: Flags non-compliant code early in the development cycle. Recommendation: Enforce as a gateway check in PR pipelines to catch issues pre-merge."*
How can I help you explore Laravel packages today?