jrmajor / cs
我的 PHP-CS-Fixer 配置
v0.6.0
2024-06-02 11:36 UTC
Requires
- php: 8.2 - 8.3
- friendsofphp/php-cs-fixer: ^3.58
- kubawerlos/php-cs-fixer-custom-fixers: ^3.21
Requires (Dev)
- php-cs-fixer/phpunit-constraint-isidenticalstring: ^1.5
- phpstan/phpstan: ^1.11
- phpstan/phpstan-phpunit: ^1.4
- phpunit/phpunit: ^11.1
This package is auto-updated.
Last update: 2024-09-01 10:31:07 UTC
README
我的个人 PHP-CS-Fixer 配置,用于所有我的 PHP 项目中。
通过 Composer 安装它: composer require jrmajor/cs
并在 .php-cs-fixer.php
中使用 Major\CS\config()
函数
<?php $finder = PhpCsFixer\Finder::create() ->in(__DIR__) ->notPath('bootstrap/cache') ->notPath('node_modules') ->notPath('storage') ->notName('*.blade.php') ->notName('_ide_helper*.php') ->ignoreVCSIgnored(true); return Major\CS\config($finder, ['overwritten_rule' => false]);
别忘了将 .php-cs-fixer.cache
添加到 .gitignore
文件中!