-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.dist.php
46 lines (41 loc) · 1.61 KB
/
.php-cs-fixer.dist.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
<?php
use PhpCsFixerCustomFixers\Fixer\CommentSurroundedBySpacesFixer;
use PhpCsFixerCustomFixers\Fixer\ConstructorEmptyBracesFixer;
use PhpCsFixerCustomFixers\Fixer\DeclareAfterOpeningTagFixer;
use PhpCsFixerCustomFixers\Fixer\MultilineCommentOpeningClosingAloneFixer;
use PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocArrayStyleFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocNoSuperfluousParamFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocParamOrderFixer;
use PhpCsFixerCustomFixers\Fixer\PhpdocTypesTrimFixer;
use PhpCsFixerCustomFixers\Fixer\PromotedConstructorPropertyFixer;
$excludes = [
'vendor',
];
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/src',
__DIR__.'/tests',
])
->exclude($excludes);
$rules = [
'@Symfony' => true,
'phpdoc_to_comment' => false,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'parameters']],
'phpdoc_array_type' => true,
'phpdoc_param_order' => true,
CommentSurroundedBySpacesFixer::name() => true,
ConstructorEmptyBracesFixer::name() => true,
DeclareAfterOpeningTagFixer::name() => true,
MultilineCommentOpeningClosingAloneFixer::name() => true,
MultilinePromotedPropertiesFixer::name() => true,
PhpdocNoSuperfluousParamFixer::name() => true,
PhpdocTypesTrimFixer::name() => true,
PromotedConstructorPropertyFixer::name() => true,
MultilinePromotedPropertiesFixer::name() => true,
];
$config = new PhpCsFixer\Config();
return $config
->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers())
->setRules($rules)
->setFinder($finder);