LaravelPackages.net
Acme Inc.
Toggle sidebar
bgaze/laravel-php-cs-fixer

A PHP-CS-Fixer bridge for use via Artisan CLI on Laravel 5.5+

4.203
12
2.1.0
About bgaze/laravel-php-cs-fixer

bgaze/laravel-php-cs-fixer is a Laravel package for a php-cs-fixer bridge for use via artisan cli on laravel 5.5+. It currently has 12 GitHub stars and 4.203 downloads on Packagist (latest version 2.1.0). Install it with composer require bgaze/laravel-php-cs-fixer. Discover more Laravel packages by bgaze or browse all Laravel packages to compare alternatives.

Last updated

PHP CS Fixer for Laravel 5.5+

GitHub license Maintenance GitHub release (latest by date) GitHub stars Packagist

This package allows to use PHP-CS-Fixer right into Laravel 5.5+ applications to format PHP code.

Documentation

Full documentation is available at https://packages.bgaze.fr/laravel-php-cs-fixer

Quick start

Install this package using Composer.

$ composer require bgaze/laravel-php-cs-fixer

To customize the configuration, publish it:

$ php artisan vendor:publish --tag=bgaze-php-cs-fixer-config

Notes : Configuration returns an instance of \PhpCsFixer\Config and will be published into a .php_cs.dist file at the Laravel installation root.

Use php-cs-fixer:fix artisan command to fix files in your application:

$ php-cs-fixer:fix [options] path1 [path2 path3 ...]

Use php_cs_fixer() helper to fix files from the code:

// Quick.
php_cs_fixer('path/to/a/file/or/dir');

// Advanced.
php_cs_fixer(['path/to/file/or/dir/1', 'path/to/file/or/dir/2'], [
    '--allow-risky' => true,
    '--dry-run' => true,
    '--config' => 'path/to/a/config/file'
]);

Star History Chart