kubawerlos/php-cs-fixer-config

Provides configuration for PHP CS Fixer

v4.3.0 2024-12-07 15:44 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.