Uniformly manage the code style of all projects.
Require this package with composer using the following command:
composer require baijunyao/php-cs-fixer-config --dev
Create .php-cs-fixer.php in your project root directory.
<?php
declare(strict_types=1);
use Baijunyao\PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()->in(__DIR__);
return (new Config())->setFinder($finder);
Add .php-cs-fixer.cache
to .gitignore
Execute the following command.
vendor/bin/php-cs-fixer fix