-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
executable file
·62 lines (54 loc) · 1.65 KB
/
.php-cs-fixer.php
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$header = <<<'EOF'
This file is part of PHP CS Fixer.
(c) Fabien Potencier <[email protected]>
Dariusz Rumiński <[email protected]>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
$finder = (new Finder())
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->exclude(['dev-tools/phpstan', 'tests/Fixtures'])
->in(__DIR__)
;
return (new Config())
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@PSR12:risky' => true,
'@PHP82Migration' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'blank_line_before_statement' => true,
'comment_to_phpdoc' => false,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
'phpdoc_add_missing_param_annotation' => true,
'no_superfluous_phpdoc_tags' => false,
'phpdoc_align' => [
'align' => 'left',
],
'no_unused_imports' => true,
'single_line_comment_style' => false,
'strict_comparison' => false,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'new_line_for_chained_calls',
],
])
->setFinder($finder);