Looking to hire Laravel developers? Try LaraJobs

php-cs-fixer-laravel-ruleset maintained by szepeviktor

Description
Provides the ruleset from Laravel Pint
Last update
2022/06/24 19:41 (dev-master)
License
Links
Downloads
5

Comments
comments powered by Disqus

Laravel ruleset for PHP CS Fixer

Installation

Run

composer require --dev szepeviktor/php-cs-fixer-laravel-ruleset

Usage

Configuration

Create a configuration file .php-cs-fixer.php in the root of your project:

use SzepeViktor\PhpCsFixer\Laravel\Factory;

$config = Factory::fromLaravelRuleSet();

$config->getFinder()
    ->in([
        __DIR__ . '/app',
        __DIR__ . '/config',
        __DIR__ . '/database',
        __DIR__ . '/routes',
        __DIR__ . '/tests',
    ])
;

return $config;