kubawerlos/php-cs-fixer-config

Provides configuration for PHP CS Fixer

v4.1.0 2024-10-26 18:53 UTC

README

Latest stable version PHP version CI Status License

Provides a configuration for PHP CS Fixer.

Installation

composer require --dev kubawerlos/php-cs-fixer-config
php vendor/bin/fixinit

Usage

Create .php-cs-fixer.php file and use PhpCsFixerConfig\Factory:

<?php
return PhpCsFixerConfig\Factory::createForLibrary('Library', 'Author', 2020 /* license initial year */)
    ->setFinder(
        PhpCsFixer\Finder::create()
            ->files()
            ->in(__DIR__ . '/src')
    );

for library or use method createForProject for project.