acadea/fixer

Laravel package to programmatically fix code using php cs fixer

Fund package maintenance!
acadea

v1.0.4 2020-09-27 12:00 UTC

This package is auto-updated.

Last update: 2024-10-27 08:45:41 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A tiny Laravel package to programmatically fix code using PHP CS Fixer.

Support us

Follow us on Youtube: Acadea.io

Installation

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
    ]   
];

Usage

use Acadea\Fixer\Facade\Fixer;

// ..

$fixed = Fixer::format($code);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email opensource@acadea.io instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.