Skip to content

Commit 04c29ee

Browse files
committed
Import package
1 parent ff58d79 commit 04c29ee

27 files changed

+795
-267
lines changed

.php-cs-fixer.dist.php

Lines changed: 118 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php declare(strict_types=1);
22

33
$finder = PhpCsFixer\Finder::create()->in([
4-
'config',
5-
'database',
64
'src',
75
'tests',
86
]);
@@ -11,16 +9,23 @@
119
/*
1210
* Alias
1311
*/
14-
'array_push' => false, // risky
12+
'array_push' => false,
13+
// risky
1514
'backtick_to_shell_exec' => true,
16-
'ereg_to_preg' => true, // risky
17-
'mb_str_functions' => true, // risky
18-
'no_alias_functions' => ['sets' => ['@all']], // risky
15+
'ereg_to_preg' => true,
16+
// risky
17+
'mb_str_functions' => true,
18+
// risky
19+
'no_alias_functions' => ['sets' => ['@all']],
20+
// risky
1921
'no_alias_language_construct_call' => true,
2022
'no_mixed_echo_print' => ['use' => 'echo'],
21-
'pow_to_exponentiation' => true, // risky
22-
'random_api_migration' => true, // risky
23-
'set_type_to_cast' => true, // risky
23+
'pow_to_exponentiation' => true,
24+
// risky
25+
'random_api_migration' => true,
26+
// risky
27+
'set_type_to_cast' => true,
28+
// risky
2429
/*
2530
* Array notation
2631
*/
@@ -42,9 +47,11 @@
4247
'position_after_anonymous_constructs' => 'same',
4348
],
4449
'encoding' => true,
45-
'non_printable_character' => ['use_escape_sequences_in_strings' => true], // risky
50+
'non_printable_character' => ['use_escape_sequences_in_strings' => true],
51+
// risky
4652
'octal_notation' => true,
47-
'psr_autoloading' => true, // risky
53+
'psr_autoloading' => true,
54+
// risky
4855
/*
4956
* Casing
5057
*/
@@ -62,44 +69,62 @@
6269
*/
6370
'cast_spaces' => ['space' => 'single'],
6471
'lowercase_cast' => true,
65-
'modernize_types_casting' => true, // risky
72+
'modernize_types_casting' => true,
73+
// risky
6674
'no_short_bool_cast' => true,
6775
'no_unset_cast' => true,
6876
'short_scalar_cast' => true,
6977
/*
7078
* Class Notation
7179
*/
7280
//'class_attributes_separation' => ['elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none', 'case' => 'none']], // Not yet released
73-
'class_attributes_separation' => ['elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'none']],
81+
'class_attributes_separation' => [
82+
'elements' => [
83+
'const' => 'one',
84+
'method' => 'one',
85+
'property' => 'one',
86+
'trait_import' => 'none',
87+
],
88+
],
7489
'class_definition' => [
7590
'multi_line_extends_each_single_line' => false,
7691
'single_item_single_line' => false,
7792
'single_line' => false,
7893
],
79-
'final_class' => false, // risky
80-
'final_internal_class' => false, //risky
81-
'final_public_method_for_abstract_class' => false, // risky
94+
'final_class' => false,
95+
// risky
96+
'final_internal_class' => false,
97+
//risky
98+
'final_public_method_for_abstract_class' => false,
99+
// risky
82100
'no_blank_lines_after_class_opening' => true,
83101
'no_null_property_initialization' => false,
84-
'no_php4_constructor' => true, // risky
85-
'no_unneeded_final_method' => true, // risky
102+
'no_php4_constructor' => true,
103+
// risky
104+
'no_unneeded_final_method' => true,
105+
// risky
86106
'ordered_class_elements' => ['order' => ['use_trait', 'constant', 'property_static', 'property', 'construct']],
87-
'ordered_interfaces' => ['order' => 'alpha', 'direction' => 'ascend'], // risky
88-
'ordered_traits' => true, // risky
107+
'ordered_interfaces' => ['order' => 'alpha', 'direction' => 'ascend'],
108+
// risky
109+
'ordered_traits' => true,
110+
// risky
89111
'protected_to_private' => false,
90-
'self_accessor' => true, // risky
112+
'self_accessor' => true,
113+
// risky
91114
'self_static_accessor' => true,
92115
'single_class_element_per_statement' => true,
93116
'single_trait_insert_per_statement' => true,
94117
'visibility_required' => ['elements' => ['property', 'method', 'const']],
95118
/*
96119
* Class Usage
97120
*/
98-
'date_time_immutable' => true, // risky
121+
'date_time_immutable' => true,
122+
// risky
99123
/*
100124
* Comment
101125
*/
102-
'comment_to_phpdoc' => true, // risky
126+
'comment_to_phpdoc' => true,
127+
// risky
103128
'header_comment' => false,
104129
'multiline_comment_opening_closing' => true,
105130
'no_empty_comment' => true,
@@ -109,7 +134,8 @@
109134
/*
110135
* Constant Notation
111136
*/
112-
'native_constant_invocation' => false, // risky
137+
'native_constant_invocation' => false,
138+
// risky
113139
/*
114140
* Control structures
115141
*/
@@ -143,12 +169,16 @@
143169
/*
144170
* Function Notation
145171
*/
146-
'combine_nested_dirname' => true, // risky
147-
'fopen_flag_order' => true, // risky
148-
'fopen_flags' => ['b_mode' => false], // risky
172+
'combine_nested_dirname' => true,
173+
// risky
174+
'fopen_flag_order' => true,
175+
// risky
176+
'fopen_flags' => ['b_mode' => false],
177+
// risky
149178
'function_declaration' => ['closure_function_spacing' => 'one'],
150179
'function_typehint_space' => true,
151-
'implode_call' => true, // risky
180+
'implode_call' => true,
181+
// risky
152182
'lambda_not_used_import' => true,
153183
'method_argument_space' => [
154184
'keep_multiple_spaces_after_comma' => false,
@@ -165,15 +195,22 @@
165195
'no_unreachable_default_argument_value' => true,
166196
'no_useless_sprintf' => true,
167197
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
168-
'phpdoc_to_param_type' => false, // experimental, risky
169-
'phpdoc_to_property_type' => false, // experimental, risky
170-
'phpdoc_to_return_type' => false, // experimental, risky
171-
'regular_callable_call' => true, // risky
198+
'phpdoc_to_param_type' => false,
199+
// experimental, risky
200+
'phpdoc_to_property_type' => false,
201+
// experimental, risky
202+
'phpdoc_to_return_type' => false,
203+
// experimental, risky
204+
'regular_callable_call' => true,
205+
// risky
172206
'return_type_declaration' => true,
173207
'single_line_throw' => false,
174-
'static_lambda' => false, // risky
175-
'use_arrow_functions' => false, // risky
176-
'void_return' => true, // risky
208+
'static_lambda' => false,
209+
// risky
210+
'use_arrow_functions' => false,
211+
// risky
212+
'void_return' => true,
213+
// risky
177214
/*
178215
* Import
179216
*/
@@ -194,7 +231,8 @@
194231
'combine_consecutive_unsets' => true,
195232
'declare_equal_normalize' => ['space' => 'none'],
196233
'declare_parentheses' => true,
197-
'dir_constant' => true, // risky
234+
'dir_constant' => true,
235+
// risky
198236
'error_suppression' => false,
199237
'explicit_indirect_variable' => true,
200238
'function_to_constant' => [
@@ -206,10 +244,13 @@
206244
'phpversion',
207245
'pi',
208246
],
209-
], // risky
210-
'get_class_to_class_keyword' => true, // risky
247+
],
248+
// risky
249+
'get_class_to_class_keyword' => true,
250+
// risky
211251
'is_null' => true,
212-
'no_unset_on_property' => false, // risky
252+
'no_unset_on_property' => false,
253+
// risky
213254
'single_space_after_construct' => true,
214255
/*
215256
* List Notation
@@ -226,7 +267,8 @@
226267
/*
227268
* Naming
228269
*/
229-
'no_homoglyph_names' => false, // risky
270+
'no_homoglyph_names' => false,
271+
// risky
230272
/*
231273
* Operator
232274
*/
@@ -243,7 +285,8 @@
243285
'operator_linebreak' => ['only_booleans' => true, 'position' => 'beginning'],
244286
'standardize_increment' => false,
245287
'standardize_not_equals' => true,
246-
'ternary_to_elvis_operator' => true, // risky
288+
'ternary_to_elvis_operator' => true,
289+
// risky
247290
'ternary_to_null_coalescing' => true,
248291
'unary_operator_spaces' => true,
249292
/*
@@ -257,22 +300,34 @@
257300
/*
258301
* PHPUnit
259302
*/
260-
'php_unit_construct' => true, // risky
261-
'php_unit_dedicate_assert' => true, // risky
262-
'php_unit_dedicate_assert_internal_type' => true, //risky
263-
'php_unit_expectation' => true, // risky
303+
'php_unit_construct' => true,
304+
// risky
305+
'php_unit_dedicate_assert' => true,
306+
// risky
307+
'php_unit_dedicate_assert_internal_type' => true,
308+
//risky
309+
'php_unit_expectation' => true,
310+
// risky
264311
'php_unit_fqcn_annotation' => true,
265312
'php_unit_internal_class' => false,
266313
'php_unit_method_casing' => ['case' => 'camel_case'],
267-
'php_unit_mock' => true, // risky
268-
'php_unit_mock_short_will_return' => true, // risky
269-
'php_unit_namespaced' => true, // risky
270-
'php_unit_no_expectation_annotation' => true, // risky
271-
'php_unit_set_up_tear_down_visibility' => true, // risky
314+
'php_unit_mock' => true,
315+
// risky
316+
'php_unit_mock_short_will_return' => true,
317+
// risky
318+
'php_unit_namespaced' => true,
319+
// risky
320+
'php_unit_no_expectation_annotation' => true,
321+
// risky
322+
'php_unit_set_up_tear_down_visibility' => true,
323+
// risky
272324
'php_unit_size_class' => false,
273-
'php_unit_strict' => false, // risky
274-
'php_unit_test_annotation' => ['style' => 'annotation'], // risky
275-
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'], // risky
325+
'php_unit_strict' => false,
326+
// risky
327+
'php_unit_test_annotation' => ['style' => 'annotation'],
328+
// risky
329+
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
330+
// risky
276331
'php_unit_test_class_requires_covers' => true,
277332
/*
278333
* PHPDoc
@@ -344,21 +399,26 @@
344399
/*
345400
* Strict
346401
*/
347-
'declare_strict_types' => true, // risky
348-
'strict_comparison' => false, // risky
349-
'strict_param' => false, // risky
402+
'declare_strict_types' => true,
403+
// risky
404+
'strict_comparison' => false,
405+
// risky
406+
'strict_param' => false,
407+
// risky
350408
/*
351409
* String Notation
352410
*/
353411
'escape_implicit_backslashes' => ['single_quoted' => false, 'double_quoted' => true, 'heredoc_syntax' => true],
354412
'explicit_string_variable' => true,
355413
'heredoc_to_nowdoc' => true,
356414
'no_binary_string' => true,
357-
'no_trailing_whitespace_in_string' => false, // risky
415+
'no_trailing_whitespace_in_string' => false,
416+
// risky
358417
'simple_to_complex_string_variable' => true,
359418
'single_quote' => true,
360419
'string_length_to_empty' => true,
361-
'string_line_ending' => false, // risky
420+
'string_line_ending' => false,
421+
// risky
362422
/*
363423
* Whitespace
364424
*/

0 commit comments

Comments
 (0)