Skip to content

Commit bd7dc68

Browse files
author
Frank de Jonge
committed
Left align all the things.
1 parent 0950515 commit bd7dc68

File tree

1 file changed

+51
-57
lines changed

1 file changed

+51
-57
lines changed

src/PhpCsFixer/Rules.php

Lines changed: 51 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ public static function getForPhp72(array $overriddenRules = []): array
2626
public static function getForPhp73(array $overriddenRules = []): array
2727
{
2828
$specific73Rules = [
29-
'heredoc_indentation' => true,
29+
'heredoc_indentation' => true,
3030
'method_argument_space' => [
3131
'after_heredoc' => true,
32-
'on_multiline' => 'ensure_fully_multiline',
32+
'on_multiline' => 'ensure_fully_multiline',
3333
],
3434
'no_whitespace_before_comma_in_array' => [
3535
'after_heredoc' => true,
@@ -42,17 +42,11 @@ public static function getForPhp73(array $overriddenRules = []): array
4242
private static function getBaseRules(): array
4343
{
4444
return [
45-
'@Symfony' => true,
45+
'@Symfony' => true,
4646
'align_multiline_comment' => [
4747
'comment_type' => 'all_multiline',
4848
],
49-
'array_indentation' => true,
50-
'binary_operator_spaces' => [
51-
'default' => 'single_space',
52-
'operators' => [
53-
'=>' => 'align_single_space_minimal',
54-
],
55-
],
49+
'array_indentation' => true,
5650
'blank_line_before_statement' => [
5751
'statements' => [
5852
'break', 'continue', 'case', 'declare', 'default', 'do', 'for', 'foreach',
@@ -64,18 +58,18 @@ private static function getBaseRules(): array
6458
],
6559
'combine_consecutive_issets' => true,
6660
'combine_consecutive_unsets' => true,
67-
'combine_nested_dirname' => true,
68-
'compact_nullable_typehint' => true,
69-
'concat_space' => [
61+
'combine_nested_dirname' => true,
62+
'compact_nullable_typehint' => true,
63+
'concat_space' => [
7064
'spacing' => 'one',
7165
],
72-
'dir_constant' => true,
73-
'escape_implicit_backslashes' => true,
74-
'explicit_indirect_variable' => true,
75-
'explicit_string_variable' => true,
66+
'dir_constant' => true,
67+
'escape_implicit_backslashes' => true,
68+
'explicit_indirect_variable' => true,
69+
'explicit_string_variable' => true,
7670
'fully_qualified_strict_types' => true,
77-
'function_to_constant' => true,
78-
'global_namespace_import' => false,
71+
'function_to_constant' => true,
72+
'global_namespace_import' => false,
7973
// 'header_comment' => [ // Has too many issues atm
8074
// 'header' => '',
8175
// ],
@@ -88,33 +82,33 @@ private static function getBaseRules(): array
8882
'list_syntax' => [
8983
'syntax' => 'short',
9084
],
91-
'magic_method_casing' => true,
85+
'magic_method_casing' => true,
9286
'method_argument_space' => [
9387
'on_multiline' => 'ensure_fully_multiline',
9488
],
95-
'method_chaining_indentation' => true,
96-
'modernize_types_casting' => true,
97-
'multiline_comment_opening_closing' => true,
98-
'multiline_whitespace_before_semicolons' => true,
89+
'method_chaining_indentation' => true,
90+
'modernize_types_casting' => true,
91+
'multiline_comment_opening_closing' => true,
92+
'multiline_whitespace_before_semicolons' => true,
9993
'native_function_type_declaration_casing' => true,
100-
'no_alias_functions' => true,
101-
'no_alternative_syntax' => true,
102-
'no_extra_blank_lines' => [
94+
'no_alias_functions' => true,
95+
'no_alternative_syntax' => true,
96+
'no_extra_blank_lines' => [
10397
'tokens' => [
10498
'break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block',
10599
'return', 'square_brace_block', 'throw', 'use_trait',
106100
// TODO: Add 'use' when php-cs-fixer #3582 is fixed
107101
],
108102
],
109-
'no_null_property_initialization' => true,
110-
'no_superfluous_elseif' => true,
111-
'no_superfluous_phpdoc_tags' => true,
112-
'no_unset_cast' => true,
113-
'no_unset_on_property' => false, // It's purposely used for the side effect :(
114-
'no_useless_else' => true,
115-
'no_useless_return' => true,
103+
'no_null_property_initialization' => true,
104+
'no_superfluous_elseif' => true,
105+
'no_superfluous_phpdoc_tags' => true,
106+
'no_unset_cast' => true,
107+
'no_unset_on_property' => false, // It's purposely used for the side effect :(
108+
'no_useless_else' => true,
109+
'no_useless_return' => true,
116110
'nullable_type_declaration_for_default_null_value' => true,
117-
'ordered_class_elements' => [
111+
'ordered_class_elements' => [
118112
'order' => [
119113
'use_trait',
120114
'constant_public', 'constant_protected', 'constant_private',
@@ -126,52 +120,52 @@ private static function getBaseRules(): array
126120
'imports_order' => ['class', 'function', 'const'],
127121
],
128122
'phpdoc_line_span' => [
129-
'const' => 'single',
130-
'method' => 'multi',
123+
'const' => 'single',
124+
'method' => 'multi',
131125
'property' => 'single',
132126
],
133-
'phpdoc_no_empty_return' => true,
134-
'php_unit_construct' => true,
127+
'phpdoc_no_empty_return' => true,
128+
'php_unit_construct' => true,
135129
'php_unit_dedicate_assert_internal_type' => true,
136-
'php_unit_method_casing' => true,
130+
'php_unit_method_casing' => true,
137131
'php_unit_test_case_static_method_calls' => [
138132
'call_type' => 'self',
139133
],
140134
'phpdoc_annotation_without_dot' => false, // Sometimes comments have a good reason to end with a dot. Leave this up to the engineer.
141-
'phpdoc_no_alias_tag' => [
135+
'phpdoc_no_alias_tag' => [
142136
'replacements' => [
143137
'link' => 'see',
144138
'type' => 'var',
145139
],
146140
],
147-
'phpdoc_order' => true,
148-
'phpdoc_summary' => false, // Sometimes comments have a good reason not to end with a dot. Leave this up to the engineer.
149-
'phpdoc_to_comment' => false, // We use more annotations than only structural elements (f.e. @lang JSON)
141+
'phpdoc_order' => true,
142+
'phpdoc_summary' => false, // Sometimes comments have a good reason not to end with a dot. Leave this up to the engineer.
143+
'phpdoc_to_comment' => false, // We use more annotations than only structural elements (f.e. @lang JSON)
150144
'phpdoc_trim_consecutive_blank_line_separation' => true,
151-
'phpdoc_types_order' => [
145+
'phpdoc_types_order' => [
152146
'null_adjustment' => 'always_last',
153147
],
154148
'phpdoc_var_annotation_correct_order' => true,
155-
'pow_to_exponentiation' => true,
156-
'return_assignment' => true,
157-
'simple_to_complex_string_variable' => true,
158-
'simplified_null_return' => false, // Too many old code places that become implicit, also ignores doc blocks.
159-
'single_class_element_per_statement' => true,
160-
'single_line_throw' => false,
161-
'single_quote' => false,
162-
'single_trait_insert_per_statement' => true,
163-
'space_after_semicolon' => [
149+
'pow_to_exponentiation' => true,
150+
'return_assignment' => true,
151+
'simple_to_complex_string_variable' => true,
152+
'simplified_null_return' => false, // Too many old code places that become implicit, also ignores doc blocks.
153+
'single_class_element_per_statement' => true,
154+
'single_line_throw' => false,
155+
'single_quote' => false,
156+
'single_trait_insert_per_statement' => true,
157+
'space_after_semicolon' => [
164158
'remove_in_empty_for_expressions' => true,
165159
],
166160
'ternary_to_null_coalescing' => true,
167-
'visibility_required' => [
161+
'visibility_required' => [
168162
'elements' => [
169163
'const', 'method', 'property',
170164
],
171165
],
172166
'yoda_style' => [
173-
'equal' => false,
174-
'identical' => false,
167+
'equal' => false,
168+
'identical' => false,
175169
'less_and_greater' => false,
176170
],
177171
];

0 commit comments

Comments
 (0)