kennedy-osaze/php-cs-fixer-config
最新稳定版本:3.0
Composer 安装命令:
composer require kennedy-osaze/php-cs-fixer-config
包简介
Opinionated configuration for PHP coding standard rules
README 文档
README
This contains an opinionated PHP coding standard rules for PHP-CS-Fixer which could be used on personal projects and packages alike
Installation
composer require --dev kennedy-osaze/php-cs-fixer-config
Basic Usage
Create a .php-cs-fixer.dist.php config file at the root of your project and paste this:
<?php use KennedyOsaze\PhpCsFixerConfig\Config; use PhpCsFixer\Finder; $finder = Finder::create()->in(__DIR__); return Config::create($finder);
Customisation
By default, the package uses its default rules to set up PHP-CS-Fixer. The rules can be extended by doing:
$rules = [ // Your PHP-CS-Fixer rules come here... ]; return Config::create($finder, $rules);
The KennedyOsaze\PhpCsFixerConfig\Config::create method basically returns an instance of the PhpCsFixer\Config class, and as such, more methods from PhpCsFixer\Config class can be called on the result of the create method.
Running
Run following command in your project directory, that will run fixer for every .php file.
vendor/bin/php-cs-fixer fix
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 7.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-23