baijunyao / php-cs-fixer-config
自定义PHP CS Fixer
v0.3.1
2024-06-18 00:37 UTC
Requires
This package is auto-updated.
Last update: 2024-09-18 01:12:41 UTC
README
统一管理所有项目的代码风格。
安装
使用以下命令通过composer安装此包
composer require baijunyao/php-cs-fixer-config --dev
用法
在项目根目录创建 .php-cs-fixer.php
<?php declare(strict_types=1); use Baijunyao\PhpCsFixer\Config; use PhpCsFixer\Finder; $finder = Finder::create()->in(__DIR__); return (new Config())->setFinder($finder);
将 .php-cs-fixer.cache
添加到 .gitignore
执行以下命令。
vendor/bin/php-cs-fixer fix