fidry / php-cs-fixer-config
我为我的项目设置的PHP-CS-Fixer默认配置
1.2.1
2024-04-01 13:32 UTC
Requires
- php: ^7.2 || ^8.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.13.0
- fidry/makefile: ^0.2.1 || ^1.0.0
- friendsofphp/php-cs-fixer: ^3.32.0
- phpunit/phpunit: ^9.4.3 || ^10.0
- symfony/filesystem: ^5.4 || ^6.1
Conflicts
- friendsofphp/php-cs-fixer: <3.32.0 || >=4.0
This package is auto-updated.
Last update: 2024-08-31 00:32:25 UTC
README
我个人的PHP-CS-Fixer基础配置。
安装
composer require --dev fidry/php-cs-fixer-config
用法
<?php // php-cs-fixer.dist.php declare(strict_types=1); use Fidry\PhpCsFixerConfig\FidryConfig; use PhpCsFixer\Finder; $finder = // Configure Finder here as usual; // Here use the specific config. $config = new FidryConfig( // The header comment used <<<'EOF' This file is part of the Fidry PHP-CS-Fixer Config package. (c) Théo FIDRY <[email protected]> For the full copyright and license information, please view the LICENSE file that was distributed with this source code. EOF, // The min PHP version supported (best to align with your composer.json) 72000, ); // You can further configure the $config here, to add or override some rules. $config->addRules([ // ... ]); return $config->setFinder($finder);