-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
165 lines (156 loc) · 6.27 KB
/
.php-cs-fixer.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
declare(strict_types=1);
namespace synopsie;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()
->in('src/');
return (new Config())
->setRiskyAllowed(true)
->setRules([
'native_function_invocation' => [
'include' => [
'@all'
],
'scope' => 'namespaced',
'strict' => true,
],
'no_empty_phpdoc' => true,
'no_unused_imports' => true,
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const',
],
'sort_algorithm' => 'alpha',
],
'phpdoc_align' => [
'align' => 'vertical',
'tags' => [
'param'
]
],
'phpdoc_line_span' => [
'property' => 'single',
'method' => null,
'const' => null,
],
'phpdoc_trim' => true,
'modernize_strpos' => true,
'ordered_interfaces' => true,
'ordered_types' => true,
'elseif' => true,
'include' => true,
'simplified_if_return' => true,
'function_declaration' => true,
'return_type_declaration' => [
'space_before' => 'one'
],
'strict_param' => true,
'unary_operator_spaces' => true,
'align_multiline_comment' => [
'comment_type' => 'phpdocs_only'
],
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align_single_space_minimal',
'=' => 'align_single_space_minimal',
]
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => [
'statements' => [
'declare'
]
],
'fully_qualified_strict_types' => true,
'concat_space' => [
'spacing' => 'one'
],
'declare_strict_types' => true,
'indentation_type' => false,
'logical_operators' => true,
'native_constant_invocation' => [
'scope' => 'namespaced'
],
'new_with_braces' => [
'named_class' => true,
'anonymous_class' => false,
],
'no_closing_tag' => true,
'no_extra_blank_lines' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_whitespace_in_blank_line' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'@PSR2' => true,
'array_push' => true,
'array_syntax' => ['syntax' => 'short'],
'no_multiline_whitespace_around_double_arrow' => true,
'trim_array_spaces' => true,
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
'no_multiple_statements_per_line' => true,
'no_trailing_comma_in_singleline' => true,
'single_line_empty_body' => false,
'class_reference_name_casing' => true,
'constant_case' => ['case' => 'lower'],
'integer_literal_case' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'magic_method_casing' => true,
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'cast_spaces' => true,
'lowercase_cast' => true,
'class_definition' => [
'inline_constructor_arguments' => false,
'space_before_parenthesis' => true,
'multi_line_extends_each_single_line' => false,
'single_item_single_line' => true
],
'final_internal_class' => true,
'no_blank_lines_after_class_opening' => true,
'header_comment' => [
'comment_type' => 'comment',
'header' => <<<BODY
____ __ __ _ _ ___ ____ ____ ___ _____
/ ___| \ \ / / | \ | | / _ \ | _ \ / ___| |_ _| | ____|
\___ \ \ V / | \| | | | | | | |_) | \___ \ | | | _|
___) | | | | |\ | | |_| | | __/ ___) | | | | |___
|____/ |_| |_| \_| \___/ |_| |____/ |___| |_____|
Nacre-UI est une API destiné aux formulaires,
elle permet aux développeurs d'avoir une compatibilité entre toutes les interfaces,
mais aussi éviter les taches fastidieuses à faire.
@author Synopsie
@link https://nacre.arkaniastudios.com/home.html
@version 3.0.1
BODY,
'location' => 'after_open'
],
'no_empty_comment' => true,
'control_structure_braces' => true,
'control_structure_continuation_position' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true
],
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'combine_consecutive_unsets' => true,
'combine_consecutive_issets' => true,
'no_blank_lines_after_phpdoc' => true,
'no_superfluous_phpdoc_tags' => true,
'curly_braces_position' => [
'functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line'
]
])
->setFinder($finder)
->setIndent("\t")
->setLineEnding("\n");