Skip to content

Commit 9bb41a6

Browse files
authored
[11.x] more pint rules (#54332)
* start syncing StyleCI rules to Pint starting with the simple ones * wip * wip * wip * wip * wip * wip * wip * wip * alphabetize * `print` --> `echo` found one more * one more rule
1 parent ecc0050 commit 9bb41a6

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

pint.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"preset": "empty",
33
"rules": {
4+
"align_multiline_comment": true,
45
"array_indentation": true,
6+
"array_syntax": {
7+
"syntax": "short"
8+
},
59
"binary_operator_spaces": {
610
"default": "single_space"
711
},
@@ -13,24 +17,43 @@
1317
]
1418
},
1519
"blank_line_between_import_groups": true,
20+
"blank_lines_before_namespace": true,
21+
"braces_position": {
22+
"control_structures_opening_brace": "same_line",
23+
"functions_opening_brace": "next_line_unless_newline_at_signature_end",
24+
"anonymous_functions_opening_brace": "same_line",
25+
"classes_opening_brace": "next_line_unless_newline_at_signature_end",
26+
"anonymous_classes_opening_brace": "next_line_unless_newline_at_signature_end",
27+
"allow_single_line_empty_anonymous_classes": false,
28+
"allow_single_line_anonymous_functions": false
29+
},
1630
"cast_spaces": true,
31+
"class_definition": true,
1732
"class_reference_name_casing": true,
1833
"clean_namespace": true,
1934
"compact_nullable_type_declaration": true,
2035
"concat_space": true,
2136
"constant_case": {
2237
"case": "lower"
2338
},
39+
"control_structure_braces": true,
2440
"declare_equal_normalize": true,
2541
"elseif": true,
2642
"encoding": true,
2743
"full_opening_tag": true,
2844
"function_declaration": true,
2945
"heredoc_to_nowdoc": true,
3046
"include": true,
47+
"increment_style": {
48+
"style": "post"
49+
},
3150
"indentation_type": true,
3251
"integer_literal_case": true,
52+
"lambda_not_used_import": true,
3353
"line_ending": true,
54+
"list_syntax": {
55+
"syntax": "short"
56+
},
3457
"lowercase_cast": true,
3558
"lowercase_keywords": true,
3659
"lowercase_static_reference": true,
@@ -40,6 +63,9 @@
4063
"on_multiline": "ignore"
4164
},
4265
"method_chaining_indentation": true,
66+
"multiline_whitespace_before_semicolons": {
67+
"strategy": "no_multi_line"
68+
},
4369
"native_function_casing": true,
4470
"native_type_declaration_casing": true,
4571
"no_alternative_syntax": true,
@@ -58,11 +84,21 @@
5884
},
5985
"no_leading_import_slash": true,
6086
"no_leading_namespace_whitespace": true,
87+
"no_mixed_echo_print": {
88+
"use": "echo"
89+
},
6190
"no_multiline_whitespace_around_double_arrow": true,
6291
"no_short_bool_cast": true,
6392
"no_singleline_whitespace_before_semicolons": true,
6493
"no_space_around_double_colon": true,
94+
"no_spaces_around_offset": {
95+
"positions": [
96+
"inside",
97+
"outside"
98+
]
99+
},
65100
"no_spaces_after_function_name": true,
101+
"no_trailing_comma_in_singleline": true,
66102
"no_trailing_whitespace": true,
67103
"no_trailing_whitespace_in_comment": true,
68104
"no_unneeded_braces": true,
@@ -85,13 +121,55 @@
85121
"function"
86122
]
87123
},
124+
"phpdoc_align": {
125+
"align": "left",
126+
"spacing": {
127+
"param": 2
128+
}
129+
},
88130
"phpdoc_indent": true,
89131
"phpdoc_inline_tag_normalizer": true,
90132
"phpdoc_no_access": true,
91133
"phpdoc_no_package": true,
92134
"phpdoc_no_useless_inheritdoc": true,
135+
"phpdoc_order": {
136+
"order": [
137+
"param",
138+
"return",
139+
"throws"
140+
]
141+
},
93142
"phpdoc_return_self_reference": true,
94143
"phpdoc_scalar": true,
144+
"phpdoc_separation": {
145+
"groups": [
146+
[
147+
"deprecated",
148+
"link",
149+
"see",
150+
"since"
151+
],
152+
[
153+
"author",
154+
"copyright",
155+
"license"
156+
],
157+
[
158+
"category",
159+
"package",
160+
"subpackage"
161+
],
162+
[
163+
"property",
164+
"property-read",
165+
"property-write"
166+
],
167+
[
168+
"param",
169+
"return"
170+
]
171+
]
172+
},
95173
"phpdoc_single_line_var_spacing": true,
96174
"phpdoc_summary": true,
97175
"phpdoc_trim": true,
@@ -103,15 +181,18 @@
103181
"short_scalar_cast": true,
104182
"single_blank_line_at_eof": true,
105183
"single_class_element_per_statement": true,
184+
"single_import_per_statement": true,
106185
"single_line_after_imports": true,
107186
"single_line_comment_style": true,
108187
"single_quote": true,
109188
"space_after_semicolon": true,
189+
"spaces_inside_parentheses": true,
110190
"standardize_not_equals": true,
111191
"switch_case_semicolon_to_colon": true,
112192
"switch_case_space": true,
113193
"switch_continue_to_break": true,
114194
"ternary_operator_spaces": true,
195+
"trailing_comma_in_multiline": true,
115196
"trim_array_spaces": true,
116197
"type_declaration_spaces": true,
117198
"types_spaces": true,

0 commit comments

Comments
 (0)