... | ... |
@@ -15,42 +15,54 @@ $finder = PhpCsFixer\Finder::create() |
15 | 15 |
|
16 | 16 |
return PhpCsFixer\Config::create() |
17 | 17 |
->setRules([ |
18 |
- '@Symfony' => true, |
|
19 |
- '@Symfony:risky' => true, |
|
20 |
- '@PHPUnit60Migration:risky' => true, |
|
21 |
- 'align_multiline_comment' => true, |
|
22 |
- 'array_syntax' => ['syntax' => 'short'], |
|
23 |
- 'combine_consecutive_issets' => true, |
|
24 |
- 'combine_consecutive_unsets' => true, |
|
25 |
- 'compact_nullable_typehint' => true, |
|
26 |
- 'general_phpdoc_annotation_remove' => [ |
|
27 |
- 'expectedException', |
|
28 |
- 'expectedExceptionMessage', |
|
29 |
- ], |
|
30 |
- 'header_comment' => ['header' => $header], |
|
31 |
- 'heredoc_to_nowdoc' => true, |
|
32 |
- 'linebreak_after_opening_tag' => true, |
|
33 |
- 'no_null_property_initialization' => true, |
|
34 |
- 'no_superfluous_elseif' => true, |
|
35 |
- 'no_unreachable_default_argument_value' => true, |
|
36 |
- 'no_useless_else' => true, |
|
37 |
- 'no_useless_return' => true, |
|
38 |
- 'ordered_class_elements' => true, |
|
39 |
- 'ordered_imports' => true, |
|
40 |
- 'php_unit_strict' => true, |
|
41 |
- 'phpdoc_add_missing_param_annotation' => true, |
|
42 |
- 'phpdoc_order' => true, |
|
43 |
- 'phpdoc_types_order' => [ |
|
44 |
- 'null_adjustment' => 'always_last', |
|
45 |
- 'sort_algorithm' => 'none', |
|
46 |
- ], |
|
47 |
- 'strict_comparison' => true, |
|
48 |
- 'strict_param' => true, |
|
49 |
- // Remove when https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3222 has been merged |
|
50 |
- 'LeoFeyer/optimize_native_functions' => true, |
|
51 |
- ]) |
|
52 |
- ->registerCustomFixers([ |
|
53 |
- new LeoFeyer\PhpCsFixer\OptimizeNativeFunctionsFixer() |
|
18 |
+ '@Symfony' => true, |
|
19 |
+ '@Symfony:risky' => true, |
|
20 |
+ '@PHPUnit60Migration:risky' => true, |
|
21 |
+ 'align_multiline_comment' => true, |
|
22 |
+ 'array_indentation' => true, |
|
23 |
+ 'array_syntax' => ['syntax' => 'short'], |
|
24 |
+ 'combine_consecutive_issets' => true, |
|
25 |
+ 'combine_consecutive_unsets' => true, |
|
26 |
+ 'comment_to_phpdoc' => true, |
|
27 |
+ 'compact_nullable_typehint' => true, |
|
28 |
+ 'escape_implicit_backslashes' => true, |
|
29 |
+ 'fopen_flags' => false, |
|
30 |
+ 'fully_qualified_strict_types' => true, |
|
31 |
+ 'general_phpdoc_annotation_remove' => [ |
|
32 |
+ 'expectedException', |
|
33 |
+ 'expectedExceptionMessage', |
|
34 |
+ ], |
|
35 |
+ 'header_comment' => ['header' => $header], |
|
36 |
+ 'heredoc_to_nowdoc' => true, |
|
37 |
+ 'linebreak_after_opening_tag' => true, |
|
38 |
+ 'multiline_comment_opening_closing' => true, |
|
39 |
+ 'multiline_whitespace_before_semicolons' => [ |
|
40 |
+ 'strategy' => 'new_line_for_chained_calls', |
|
41 |
+ ], |
|
42 |
+ 'native_function_invocation' => [ |
|
43 |
+ 'include' => ['@compiler_optimized'], |
|
44 |
+ ], |
|
45 |
+ 'no_alternative_syntax' => true, |
|
46 |
+ 'no_binary_string' => true, |
|
47 |
+ 'no_null_property_initialization' => true, |
|
48 |
+ 'no_superfluous_elseif' => true, |
|
49 |
+ 'no_unreachable_default_argument_value' => true, |
|
50 |
+ 'no_useless_else' => true, |
|
51 |
+ 'no_useless_return' => true, |
|
52 |
+ 'ordered_class_elements' => true, |
|
53 |
+ 'ordered_imports' => true, |
|
54 |
+ 'php_unit_strict' => true, |
|
55 |
+ 'phpdoc_add_missing_param_annotation' => true, |
|
56 |
+ 'phpdoc_order' => true, |
|
57 |
+ 'phpdoc_trim_consecutive_blank_line_separation' => true, |
|
58 |
+ 'phpdoc_types_order' => [ |
|
59 |
+ 'null_adjustment' => 'always_last', |
|
60 |
+ 'sort_algorithm' => 'none', |
|
61 |
+ ], |
|
62 |
+ 'return_assignment' => true, |
|
63 |
+ 'strict_comparison' => true, |
|
64 |
+ 'strict_param' => true, |
|
65 |
+ 'string_line_ending' => true, |
|
54 | 66 |
]) |
55 | 67 |
->setFinder($finder) |
56 | 68 |
->setRiskyAllowed(true) |