Skip to content

acadea/fixer

Repository files navigation

Laravel Fixer

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 [email protected] instead of using the issue tracker.

Credits

License

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

About

Programatically fix php code

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages