【发布时间】:2017-07-05 17:20:51
【问题描述】:
您好,我是第一次使用 php-cs-fixer。我知道我们必须设置一个 .php_cs.dist 文件
这是我从 php-cs-fixer 的 git 存储库中获得的示例文件。
$finder = PhpCsFixer\Finder::create()
->exclude('somedir')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRules(array(
'@Symfony' => true,
'full_opening_tag' => false,
))
->setFinder($finder);
当我在 CLI
上运行此命令时php-cs-fixer 修复 --config=.php_cs.dist --allow-risky
这是说我需要为 --allow-risky 提供选项,但在文档中并没有提到如何设置允许有风险的选项来帮助我。越早越好。
我的问题 如何运行有风险的规则?由于没有提到如何在 php-cs-fixer 中使用 allow risky 规则。
【问题讨论】:
标签: php configuration command-line-interface php-cs-fixer