File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,43 @@ $config->setFinder($finder);
3333return $config;
3434```
3535
36+ ### Custom configuration
37+
38+ You may extend these rules and apply your own extra rules.
39+
40+ Create a configuration file ` .php-cs-fixer.dist.php ` in the root of your project:
41+
42+ ``` php
43+ <?php
44+
45+ $finder = PhpCsFixer\Finder::create()
46+ ->in([
47+ __DIR__.'/src',
48+ __DIR__.'/tests',
49+ ]);
50+
51+ $config = new class() extends PhpCsFixer\Config {
52+ public function __construct()
53+ {
54+ parent::__construct('customized Bedrock Streaming');
55+ $this->setRiskyAllowed(true);
56+ }
57+
58+ public function getRules(): array
59+ {
60+ $rules = (new M6Web\CS\Config\BedrockStreaming())->getRules();
61+
62+ // perform updates on the rules array here
63+
64+ return $rules;
65+ }
66+ };
67+
68+ $config->setFinder($finder);
69+
70+ return $config;
71+ ```
72+
3673### Git
3774
3875Add ` .php-cs-fixer.cache ` (this is the cache file created by ` php-cs-fixer ` ) to ` .gitignore ` :
You can’t perform that action at this time.
0 commit comments