1+ <?php declare (strict_types=1 );
2+
3+ $ finder = PhpCsFixer \Finder::create ()
4+ ->files ()
5+ ->in (__DIR__ . '/src ' )
6+ ->in (__DIR__ . '/tests ' );
7+
8+ return (new PhpCsFixer \Config ())
9+ ->setFinder ($ finder )
10+ ->setRiskyAllowed (true )
11+ ->setRules ([
12+ '@PSR12 ' => true ,
13+ 'modernize_types_casting ' => true ,
14+ 'multiline_comment_opening_closing ' => true ,
15+ 'multiline_whitespace_before_semicolons ' => true ,
16+ 'native_type_declaration_casing ' => true ,
17+ 'no_alias_functions ' => true ,
18+ 'no_alias_language_construct_call ' => true ,
19+ 'no_alternative_syntax ' => true ,
20+ 'no_binary_string ' => true ,
21+ 'no_blank_lines_after_phpdoc ' => true ,
22+ 'no_empty_comment ' => true ,
23+ 'no_empty_statement ' => true ,
24+ 'no_extra_blank_lines ' => true ,
25+ 'no_homoglyph_names ' => true ,
26+ 'no_leading_namespace_whitespace ' => true ,
27+ 'no_multiline_whitespace_around_double_arrow ' => true ,
28+ 'no_null_property_initialization ' => true ,
29+ 'no_short_bool_cast ' => true ,
30+ 'no_singleline_whitespace_before_semicolons ' => true ,
31+ 'no_spaces_around_offset ' => true ,
32+ 'no_superfluous_elseif ' => true ,
33+ 'no_superfluous_phpdoc_tags ' => [
34+ 'allow_mixed ' => true ,
35+ ],
36+ 'no_trailing_comma_in_singleline ' => true ,
37+ 'no_trailing_whitespace_in_string ' => true ,
38+ 'no_unneeded_braces ' => true ,
39+ 'no_unneeded_control_parentheses ' => true ,
40+ 'no_unneeded_import_alias ' => true ,
41+ 'no_unset_cast ' => true ,
42+ 'no_unset_on_property ' => true ,
43+ 'no_unused_imports ' => true ,
44+ 'no_useless_concat_operator ' => true ,
45+ 'no_useless_else ' => true ,
46+ 'no_useless_nullsafe_operator ' => true ,
47+ 'no_useless_return ' => true ,
48+ 'no_whitespace_before_comma_in_array ' => true ,
49+ 'non_printable_character ' => true ,
50+ 'normalize_index_brace ' => true ,
51+ 'php_unit_set_up_tear_down_visibility ' => true ,
52+ 'php_unit_test_case_static_method_calls ' => [
53+ 'call_type ' => 'this ' ,
54+ ],
55+ 'phpdoc_add_missing_param_annotation ' => false ,
56+ 'phpdoc_align ' => true ,
57+ 'phpdoc_annotation_without_dot ' => true ,
58+ 'phpdoc_indent ' => true ,
59+ 'phpdoc_inline_tag_normalizer ' => true ,
60+ 'phpdoc_no_access ' => true ,
61+ 'phpdoc_no_alias_tag ' => true ,
62+ 'phpdoc_no_empty_return ' => true ,
63+ 'phpdoc_no_package ' => true ,
64+ 'phpdoc_no_useless_inheritdoc ' => true ,
65+ 'phpdoc_order ' => true ,
66+ 'phpdoc_order_by_value ' => [
67+ 'annotations ' => [
68+ 'covers ' ,
69+ 'dataProvider ' ,
70+ 'throws ' ,
71+ 'uses ' ,
72+ ],
73+ ],
74+ 'phpdoc_param_order ' => true ,
75+ 'phpdoc_return_self_reference ' => true ,
76+ 'phpdoc_scalar ' => true ,
77+ 'phpdoc_separation ' => true ,
78+ 'phpdoc_single_line_var_spacing ' => true ,
79+ 'phpdoc_summary ' => true ,
80+ 'phpdoc_tag_casing ' => true ,
81+ 'phpdoc_tag_type ' => true ,
82+ 'phpdoc_to_comment ' => false ,
83+ 'phpdoc_trim ' => true ,
84+ 'simplified_null_return ' => true ,
85+ 'single_line_comment_spacing ' => true ,
86+ 'single_quote ' => true ,
87+ 'single_space_around_construct ' => true ,
88+ 'space_after_semicolon ' => true ,
89+ 'standardize_increment ' => true ,
90+ 'standardize_not_equals ' => true ,
91+ 'static_lambda ' => true ,
92+ 'strict_param ' => true ,
93+ 'string_length_to_empty ' => true ,
94+ 'string_line_ending ' => true ,
95+ 'switch_continue_to_break ' => true ,
96+ 'trim_array_spaces ' => true ,
97+ 'whitespace_after_comma_in_array ' => true ,
98+ ])
99+ ->setLineEnding ("\n" );
0 commit comments