-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
43 lines (39 loc) · 1.52 KB
/
.php-cs-fixer.dist.php
File metadata and controls
43 lines (39 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
use Webware\CodingStandard\WebwareCopyRight;
use Webware\CodingStandard\Webware1x0Set;
$composerData = json_decode(file_get_contents('composer.json'), true);
return (new Config())
->registerCustomRuleSets([
new WebwareCopyRight(
packageName: $composerData['name'],
authorName: $composerData['authors'][0]['name'],
authorEmail: $composerData['authors'][0]['email'],
minYear: '2026',
),
new Webware1x0Set(),
])
->setParallelConfig(ParallelConfigFactory::detect()) // @TODO 4.0 no need to call this manually
->setRiskyAllowed(true)
->setRules([
'@Webware/copyright-header' => true,
'@Webware/coding-standard-1.0' => true,
])
// 💡 by default, Fixer looks for `*.php` files excluding `./vendor/` - here, you can groom this config
->setFinder(
(new Finder())
// 💡 root folder to check
->in(__DIR__)
// 💡 additional files, eg bin entry file
// ->append([__DIR__.'/bin-entry-file'])
// 💡 folders to exclude, if any
// ->exclude([/* ... */])
// 💡 path patterns to exclude, if any
// ->notPath([/* ... */])
// 💡 extra configs
// ->ignoreDotFiles(false) // true by default in v3, false in v4 or future mode
// ->ignoreVCS(true) // true by default
);