kubawerlos/php-cs-fixer-custom-fixers
Custom fixers for FriendsOfPHP PHP-CS-Fixer. Install via Composer, register the Fixers set, then enable individual rules to enforce additional style conventions (e.g., prefer class constants, remove leading global namespace slashes, tidy PHPDoc params).
isset → array_key_exists) during CI/CD to prevent subtle bugs in production.DataProvider* fixers) by enforcing modern PHPUnit conventions via CS Fixer.NoDoctrineMigrationsGeneratedCommentFixer).CommentedOutFunctionFixer) or unsafe references (NoReferenceInFunctionDefinitionFixer).Adopt When:
NoUselessCommentFixer, NoTrailingCommaInSinglelineFixer).PhpUnitAssertArgumentsOrderFixer).Look Elsewhere If:
IssetToArrayKeyExistsFixer in multi-dimensional arrays).eval() or runtime code generation).For Executives: "This package lets us automate 80% of our PHP code quality checks—saving 2–3 hours per developer per week on manual style fixes. By enforcing consistent standards (e.g., no commented-out debug code, modern PHPUnit practices), we’ll reduce bugs in production and speed up onboarding. It’s a low-cost, high-impact tool to professionalize our codebase, with minimal maintenance overhead (MIT license, active development)."
For Engineering Teams: *"This extends PHP CS Fixer with team-specific rules to catch issues early. For example:
array_key_exists over isset).var_dump calls) before they reach staging.For Developers: *"No more arguing about:
self::BAR or 'bar'?’ → Automated with ClassConstantUsageFixer.NoTrailingCommaInSinglelineFixer.NoPhpStormGeneratedCommentFixer.
Run it locally (./vendor/bin/php-cs-fixer fix) or in CI to keep the codebase clean. Most fixes are safe, but we’ll whitelist risky ones (e.g., IssetToArrayKeyExistsFixer) for manual review."How can I help you explore Laravel packages today?