funivan / cs
执行代码修复和审查
dev-master
2017-05-12 08:51 UTC
Requires
- php: >=5.6.0
- funivan/php-tokenizer: 0.1.2-alpha5
- symfony/console: ^2.8 | ^3.0
- symfony/finder: ^2.8 | ^3.0
- symfony/process: ^2.8 | ^3.0
Requires (Dev)
- league/commonmark: 0.15.*
- phpunit/phpunit: 5.*
- webuni/commonmark-table-extension: 0.6.*
This package is not auto-updated.
Last update: 2024-09-14 18:53:07 UTC
README
执行代码修复和审查
工具列表
安装
通过 Composer
composer require funivan/cs:dev-master
使用方法
# run review tool ./vendor/bin/cs.php review; # run fixer tool ./vendor/bin/cs.php fix;
自定义配置
创建自定义配置文件。例如 cs-fix.php
<?php # file cs-fix.php require __DIR__ . '/vendor/autoload.php'; use Funivan\Cs\Configuration\CsConfiguration; $configuration = CsConfiguration::createFixerConfiguration(); // You can set custom file finder // $configuration->setFileFinder(new MyProjectCustomFileFinder()); // You can add custom tools // $configuration->setTool(new MyProjectCustomCheckTool());
然后运行修复器
./vendor/bin/cs.php fix --configuration=cs-fixer.php -vvv
测试
./vendor/bin/phpunit
贡献
请参阅 CONTRIBUTING 了解详细信息。
鸣谢
许可协议
MIT 许可协议 (MIT)。有关更多信息,请参阅 许可文件。