sylarele/php-cs-fixer-config
最新稳定版本:v2.0.0
Composer 安装命令:
composer require sylarele/php-cs-fixer-config
包简介
Our internal PHP CS Fixer config
关键字:
README 文档
README
Configuration for https://github.com/FriendsOfPhp/PHP-CS-Fixer
Installation
composer require --dev sylarele/php-cs-fixer-config
Usage
Configuration
Create a configuration file .php-cs-fixer.php in the root of your project:
<?php declare(strict_types=1); use PhpCsFixer\Finder; use PhpCsFixer\Runner\Parallel\ParallelConfig; use Sylarele\PhpCsFixerConfig\Config; $finder = Finder::create() ->exclude('storage') ->in(__DIR__) ->append([ __FILE__, ]); $config = new Config(); return $config ->setCacheFile(__DIR__.'/storage/tmp/php-cs-fixer/.php-cs-fixer.cache') ->setFinder($finder) ->setUsingCache(true) ->setParallelConfig(new ParallelConfig(6, 80));
Custom configuration
You may extend these rules and apply your own extra rules.
Create a configuration file .php-cs-fixer.php in the root of your project:
<?php declare(strict_types=1); use PhpCsFixer\Finder; use PhpCsFixer\Runner\Parallel\ParallelConfig; $finder = Finder::create() ->exclude('storage') ->in(__DIR__) ->append([ __FILE__, ]); $config = new class() extends PhpCsFixer\Config { public function __construct() { parent::__construct('Customized Sylarele'); $this->setRiskyAllowed(true); } public function getRules(): array { $rules = (new Sylarele\PhpCsFixerConfig\Config())->getRules(); // Update the rules table here return $rules; } }; $config->setFinder($finder); return $config;
统计信息
- 总下载量: 1.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-10