55namespace Mollie \PhpCodingStandards \PhpCsFixer ;
66
77/*
8- * Last updated for php-cs-fixer version: 2.15
8+ * Last updated for php-cs-fixer version: 2.16
99 */
1010class Rules
1111{
@@ -46,10 +46,7 @@ private static function getBaseRules(): array
4646 'align_multiline_comment ' => [
4747 'comment_type ' => 'all_multiline ' ,
4848 ],
49- 'array_indentation ' => true ,
50- 'array_syntax ' => [
51- 'syntax ' => 'short ' ,
52- ],
49+ 'array_indentation ' => true ,
5350 'binary_operator_spaces ' => [
5451 'default ' => 'align_single_space_minimal ' ,
5552 ],
@@ -75,6 +72,7 @@ private static function getBaseRules(): array
7572 'explicit_string_variable ' => true ,
7673 'fully_qualified_strict_types ' => true ,
7774 'function_to_constant ' => true ,
75+ 'global_namespace_import ' => true ,
7876 // 'header_comment' => [ // Has too many issues atm
7977 // 'header' => '',
8078 // ],
@@ -105,14 +103,15 @@ private static function getBaseRules(): array
105103 // TODO: Add 'use' when php-cs-fixer #3582 is fixed
106104 ],
107105 ],
108- 'no_null_property_initialization ' => true ,
109- 'no_superfluous_elseif ' => true ,
110- 'no_superfluous_phpdoc_tags ' => true ,
111- 'no_unset_cast ' => true ,
112- 'no_unset_on_property ' => false , // It's purposely used for the side effect :(
113- 'no_useless_else ' => true ,
114- 'no_useless_return ' => true ,
115- 'ordered_class_elements ' => [
106+ 'no_null_property_initialization ' => true ,
107+ 'no_superfluous_elseif ' => true ,
108+ 'no_superfluous_phpdoc_tags ' => true ,
109+ 'no_unset_cast ' => true ,
110+ 'no_unset_on_property ' => false , // It's purposely used for the side effect :(
111+ 'no_useless_else ' => true ,
112+ 'no_useless_return ' => true ,
113+ 'nullable_type_declaration_for_default_null_value ' => true ,
114+ 'ordered_class_elements ' => [
116115 'order ' => [
117116 'use_trait ' ,
118117 'constant_public ' , 'constant_protected ' , 'constant_private ' ,
@@ -123,6 +122,12 @@ private static function getBaseRules(): array
123122 'ordered_imports ' => [
124123 'imports_order ' => ['class ' , 'function ' , 'const ' ],
125124 ],
125+ 'phpdoc_line_span ' => [
126+ 'const ' => 'single ' ,
127+ 'method ' => 'multi ' ,
128+ 'property ' => 'single ' ,
129+ ],
130+ 'phpdoc_no_empty_return ' => true ,
126131 'php_unit_construct ' => true ,
127132 'php_unit_dedicate_assert_internal_type ' => true ,
128133 'php_unit_method_casing ' => true ,
@@ -149,6 +154,7 @@ private static function getBaseRules(): array
149154 'simple_to_complex_string_variable ' => true ,
150155 'simplified_null_return ' => false , // Too many old code places that become implicit, also ignores doc blocks.
151156 'single_class_element_per_statement ' => true ,
157+ 'single_line_throw ' => false ,
152158 'single_quote ' => false ,
153159 'single_trait_insert_per_statement ' => true ,
154160 'space_after_semicolon ' => [
0 commit comments