consistence/coding-standard
PHP coding standard for Consistence projects: a ready-to-use PHP_CodeSniffer ruleset plus configuration to enforce consistent style, naming, and best practices across codebases. Easy to adopt in CI and local development to keep code clean and uniform.
main.float over double, disallowing empty()) from day one, future-proofing the codebase.Adopt if:
@return in UserRepository.php").Look elsewhere if:
match expressions, union types) or active maintenance (last update: 2020).php-cs-fixer instead).For Executives/Stakeholders:
"This package standardizes Laravel code quality by automating style checks—reducing PR bottlenecks and onboarding time. For example, it catches missing @return docblocks or inconsistent exception naming before they reach main, saving engineers hours in reviews. It’s a low-effort, high-impact way to improve code consistency, especially for shared libraries or teams. Think of it as ‘Laravel’s style guardrail’: minimal setup, maximum payoff for maintainability."
For Engineering Teams: *"consistence/coding-standard gives us a ready-to-use PHPCS ruleset for Laravel that enforces:
Exception suffix for classes, chainable exceptions).@var for constants, proper @return types).For Developers:
*"Tired of PRs blocked over ‘add a missing @return’ or ‘fix spacing in this array’? This tool automates Laravel’s style checks so you only review meaningful changes. It catches:
array<int, User>).empty() or double types.UserNotFound vs. UserNotFoundException).
Run it locally (phpcs) or in CI—your choice. Less noise, faster merges, and code that’s consistent by default."*How can I help you explore Laravel packages today?