A tiny Laravel package to programmatically fix code using PHP CS Fixer.
Follow us on Youtube: Acadea.io
This package assumes you have php-cs-fixer installed at ./vendor/bin/php-cs-fixer
You can install the package via composer:
composer require acadea/fixer
You can publish the config file with:
php artisan vendor:publish --provider="Acadea\Fixer\FixerServiceProvider" --tag="config"
This is the contents of the published config file:
return [
'binary' => 'path/to/bin',
'rules' => [
// php cs fixer rules, see the docs for more info
]
];
use Acadea\Fixer\Facade\Fixer;
// ..
$fixed = Fixer::format($code);
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.