Fanfou Wiki

我等采石之人,当心怀建造大教堂之愿景。

用户工具

站点工具


php-cs-fixer

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
上一修订版两侧同时换到之后的修订记录
php-cs-fixer [2021/10/21 19:48] adminphp-cs-fixer [2021/10/21 19:52] admin
行 2: 行 2:
   * https://github.com/FriendsOfPhp/PHP-CS-Fixer   * https://github.com/FriendsOfPhp/PHP-CS-Fixer
  
 +===== 安装 =====
 +
 +<code bash>
 +composer require friendsofphp/php-cs-fixer
 +</code>
 +
 +===== 配置 =====
 +
 +<file php .php-cs-fixer.dist.php>
 +<?php
 +
 +$finder = PhpCsFixer\Finder::create()
 +    ->in(__DIR__)
 +    ->exclude('vendor');
 +
 +return (new PhpCsFixer\Config())
 +    ->setCacheFile(__DIR__.'/.php-cs-fixer.cache')
 +    ->setRules(
 +        [
 +            '@Symfony' => true,
 +        ]
 +    )
 +    ->setFinder($finder);
 +
 +</file>
  
 {{tag>php}} {{tag>php}}
php-cs-fixer.txt · 最后更改: 2021/10/21 20:02 由 admin