forked from constup/aws-secrets-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
100 lines (98 loc) · 3.46 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
$finder = PhpCsFixer\Finder::create()
->exclude([
'app',
'backups',
'bin',
'doc',
'gulp_mappings',
'node_modules',
'symfony4/assets',
'symfony4/bin',
'symfony4/codeCoverage',
'symfony4/config',
'symfony4/node_modules',
'symfony4/public',
'symfony4/var',
'symfony4/vendor',
'vendor',
'web',
])
->in(__DIR__);
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => ['statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try', 'switch']],
'cast_spaces' => ['space' => 'none'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'single'],
'declare_strict_types' => true,
'elseif' => true,
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
'constant_case' => ['case' => 'lower'],
'lowercase_keywords' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'class_attributes_separation' => [
'elements' => [
'const' => 'none',
'method' => 'one',
'property' => 'none'
]
],
'new_with_braces' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'no_short_bool_cast' => true,
'echo_tag_syntax' => [
'format' => 'long'
],
'no_trailing_comma_in_singleline_array' => true,
//risky 'no_unneeded_final_method' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'normalize_index_brace' => true,
'not_operator_with_successor_space' => false,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_fqcn_annotation' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => true,
'phpdoc_indent' => true,
'phpdoc_order' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_to_comment' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
//'self_accessor' => true,
'short_scalar_cast' => true,
'single_import_per_statement' => false,
'single_blank_line_before_namespace' => true,
//'single_line_comment_style' => true,
'single_quote' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => false,
'elements' => ['arrays']
],
'trim_array_spaces' => true,
'unary_operator_spaces' => true
])
->setFinder($finder);