pedrotroller/php-cs-custom-fixer
Custom fixers for PHP-CS-Fixer. Adds rules like ordering Behat context step definition methods by annotation and method name, with options for detecting context classes. Install via Composer and register the fixers in your .php_cs(.dist) config.
composer require pedrotroller/php-cs-custom-fixer --dev..php_cs.dist (or .php_cs), register the custom fixers using ->registerCustomFixers(new PedroTroller\CS\Fixer\Fixers()).'PedroTroller/ordered_with_getter_and_setter_first' => true (or another fixer) in setRules()../vendor/bin/php-cs-fixer fix to auto-fix your codebase.PedroTroller\CS\Fixer\RuleSetFactory::create()->enable('...')->getRules() for cleaner, self-documenting rule configuration.PedroTroller/order_behat_steps) accept configuration arrays (e.g., 'instanceof' => [...]) to tailor detection to your project’s context hierarchy.php-cs-fixer fix --diff --dry-run) or CI pipelines to block non-compliant code.PedroTroller/order_behat_steps in Behat-heavy projects).PedroTroller/..., not pedrotroller/... (Laravel’s config caching won’t help here).'PedroTroller/ordered_with_getter_and_setter_first' => ['after' => ['foo', 'bar']] if other rules interfere (though not documented, inspect diff carefully).instanceof explicitly (e.g., 'instanceof' => ['App\Behat\Context\CustomContext']).vendor/bin/php-cs-fixer fix --rules='PedroTroller/order_behat_steps' --dry-run -vvv to see diffs + debug config loading.How can I help you explore Laravel packages today?