-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy path.php-cs-fixer.dist.php
128 lines (125 loc) · 3.58 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('tests/Fixtures/app/cache')
->ignoreDotFiles(false)
->in(__DIR__)
;
$config = new PhpCsFixer\Config();
return $config
->setCacheFile(__DIR__.'/.build/php-cs-fixer/php-cs-fixer.cache')
->setFinder($finder)
->setRiskyAllowed(true)
->setRules([
'@PHPUnit60Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'align_multiline_comment' => [
'comment_type' => 'phpdocs_only',
],
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short',
],
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
'do',
'exit',
'for',
'foreach',
'goto',
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
'while',
'yield',
'yield_from',
],
],
'braces_position' => [
'allow_single_line_anonymous_functions' => true,
],
'method_argument_space' => [
'after_heredoc' => false,
'keep_multiple_spaces_after_comma' => false,
'on_multiline' => 'ensure_fully_multiline',
],
'native_function_invocation' => false,
'no_extra_blank_lines' => [
'tokens' => [
'break',
'continue',
'curly_brace_block',
'extra',
'parenthesis_brace_block',
'return',
'square_brace_block',
'throw',
'use',
],
],
'no_superfluous_phpdoc_tags' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'non_printable_character' => false,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private',
],
'sort_algorithm' => 'none',
],
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
'php_unit_internal_class' => true,
'php_unit_test_case_static_method_calls' => [
'call_type' => 'self',
],
'phpdoc_order' => [
'order' => [
'internal',
'covers',
'author',
'param',
'throws',
'return',
],
],
'strict_comparison' => true,
'strict_param' => true,
'ternary_to_null_coalescing' => true,
])
;