-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php-cs-fixer.dist.php
134 lines (120 loc) · 4.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
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
129
130
131
132
133
134
<?php
$finder = (new PhpCsFixer\Finder())
->in(__DIR__ . '/src')
;
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@PhpCsFixer' => true,
'@PHP82Migration' => true,
'blank_line_after_namespace' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'no_unused_imports' => true,
'multiline_whitespace_before_semicolons' => false,
'phpdoc_to_comment' => false,
'ordered_imports' => true,
'global_namespace_import' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant',
'constant_public',
'constant_protected',
'constant_private',
'property_public_static',
'property_public',
'property_protected_static',
'property_protected',
'property_private_static',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public_static',
'method_public',
'method_protected_static',
'method_protected',
'method_private_static',
'method_private',
],
],
'php_unit_test_class_requires_covers' => false,
'method_chaining_indentation' => false,
'php_unit_internal_class' => false,
'self_static_accessor' => true,
'ternary_to_null_coalescing' => true,
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => [
'=' => 'align_single_space_minimal',
'+=' => 'align_single_space_minimal',
'-=' => 'align_single_space_minimal',
'/=' => 'align_single_space_minimal',
'*=' => 'align_single_space_minimal',
'%=' => 'align_single_space_minimal',
'**=' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
],
],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => null,
],
'concat_space' => [
'spacing' => 'one',
],
'array_syntax' => [
'syntax' => 'short',
],
'single_space_around_construct' => true,
'control_structure_braces' => true,
'control_structure_continuation_position' => true,
'declare_parentheses' => true,
'statement_indentation' => true,
'no_multiple_statements_per_line' => true,
'no_extra_blank_lines' => true,
'elseif' => true,
'trim_array_spaces' => true,
'function_declaration' => true,
'no_spaces_after_function_name' => true,
'no_spaces_inside_parenthesis' => true,
'cast_spaces' => true,
'encoding' => true,
'full_opening_tag' => true,
'linebreak_after_opening_tag' => true,
'no_closing_tag' => true,
'indentation_type' => true,
'line_ending' => true,
'single_blank_line_at_eof' => false,
'no_trailing_whitespace' => true,
'lowercase_keywords' => true,
'no_whitespace_in_blank_line' => true,
'blank_line_before_statement' => true,
'echo_tag_syntax' => true,
'doctrine_annotation_braces' => false,
'doctrine_annotation_array_assignment' => [
'operator' => '=',
],
'align_multiline_comment' => [
'comment_type' => 'all_multiline',
],
'no_superfluous_phpdoc_tags' => false,
'phpdoc_order' => true,
'phpdoc_separation' => true,
'phpdoc_var_without_name' => false,
'phpdoc_no_empty_return' => false,
'phpdoc_var_annotation_correct_order' => true,
'phpdoc_types_order' => [
'sort_algorithm' => 'none',
'null_adjustment' => 'always_last',
],
'nullable_type_declaration_for_default_null_value' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => false,
],
])
->setFinder($finder)
;