-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php-cs-fixer.dist.php
75 lines (70 loc) · 2.21 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = (new Finder())
->ignoreDotFiles(false)
->ignoreVCS(true)
->exclude([
'vendor',
'vagrant',
'files',
'docs',
'backend/web/assets',
'backend/runtime',
'frontend/web/assets',
'frontend/runtime',
'console/runtime',
'console/migrations',
'console/src',
'console/data',
'common/models/base',
'common/data',
'requirements.php',
'frontend/web/index.php',
'frontend/web/index-test.php',
'frontend/config/main-local.php',
'frontend/config/params-local.php',
'console/config/params-local.php',
'console/config/main-local.php',
'common/config/params-local.php',
'common/config/main-local.php',
'common/config/dump.php',
'backend/web/index.php',
'backend/web/index-test.php',
'backend/config/main-local.php',
'backend/config/params-local.php',
])
->in(__DIR__);
$rules = [
'@Symfony' => true,
'new_with_braces' => false,
// 'phpdoc_inline_tag' => false,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => false,
'array_indentation' => true,
'no_superfluous_phpdoc_tags' => false,
'single_line_throw' => false,
'linebreak_after_opening_tag' => true,
'multiline_whitespace_before_semicolons' => true,
'@PSR2' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true],
'phpdoc_order' => true,
'phpdoc_to_comment' => false,
'semicolon_after_instruction' => true,
'align_multiline_comment' => true,
'list_syntax' => ['syntax' => 'short'],
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
'single_line_comment_style' => true,
'increment_style' => false,
'phpdoc_var_without_name' => false,
'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'package']],
];
return (new Config())
->setRules($rules)
->setLineEnding("\n")
->setFinder($finder);