Skip to content

Commit 7664b73

Browse files
Merge pull request #1 from Gerenuk-LTD/changes
feat: add new more explicit rules ontop of psr12
2 parents 634f0fc + b511758 commit 7664b73

File tree

3 files changed

+154
-1
lines changed

3 files changed

+154
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gerenuk/php-coding-style",
3-
"description": "Gerenuk's Coding Style",
3+
"description": "Gerenuk's PHP coding style - PSR12 with some preferences",
44
"require-dev": {
55
"laravel/pint": "^1.0"
66
},

composer.lock

Lines changed: 85 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pint.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,67 @@
11
{
22
"preset": "psr12",
33
"rules": {
4+
"align_multiline_comment": true,
45
"array_indentation": true,
6+
"array_syntax": {
7+
"syntax": "short"
8+
},
9+
"assign_null_coalescing_to_coalesce_equal": false,
10+
"blank_line_before_statement": {
11+
"statements": [
12+
"break",
13+
"continue",
14+
"declare",
15+
"return",
16+
"throw",
17+
"try"
18+
]
19+
},
20+
"cast_spaces": {
21+
"space": "single"
22+
},
23+
"class_attributes_separation": {
24+
"elements": {
25+
"const": "one",
26+
"method": "one",
27+
"property": "one",
28+
"trait_import": "none",
29+
"case": "none"
30+
}
31+
},
32+
"class_reference_name_casing": true,
33+
"clean_namespace": true,
34+
"combine_consecutive_issets": true,
35+
"combine_consecutive_unsets": true,
536
"concat_space": {
637
"spacing": "one"
738
},
39+
"explicit_string_variable": true,
840
"function_declaration": {
941
"closure_fn_spacing": "none",
1042
"closure_function_spacing": "one",
1143
"trailing_comma_single_line": false
1244
},
45+
"global_namespace_import": {
46+
"import_classes": true,
47+
"import_constants": true,
48+
"import_functions": true
49+
},
50+
"magic_constant_casing": true,
51+
"magic_method_casing": true,
1352
"method_chaining_indentation": true,
53+
"native_function_casing": true,
54+
"native_type_declaration_casing": true,
55+
"no_blank_lines_after_phpdoc": true,
56+
"no_empty_comment": true,
57+
"no_leading_namespace_whitespace": true,
58+
"no_singleline_whitespace_before_semicolons": true,
59+
"no_spaces_around_offset": {
60+
"positions": [
61+
"inside",
62+
"outside"
63+
]
64+
},
1465
"no_trailing_comma_in_singleline": {
1566
"elements": [
1667
"arguments",
@@ -19,18 +70,34 @@
1970
"group_import"
2071
]
2172
},
73+
"no_unneeded_braces": true,
74+
"no_unused_imports": true,
75+
"no_useless_return": true,
2276
"no_whitespace_before_comma_in_array": {
2377
"after_heredoc": false
2478
},
79+
"normalize_index_brace": true,
80+
"object_operator_without_whitespace": true,
2581
"ordered_imports": {
2682
"imports_order": null,
2783
"sort_algorithm": "alpha"
2884
},
85+
"phpdoc_align": {
86+
"align": "vertical"
87+
},
88+
"phpdoc_order": {
89+
"order": [
90+
"param",
91+
"throws",
92+
"return"
93+
]
94+
},
2995
"single_space_around_construct": {
3096
"constructs_contain_a_single_space": [
3197
"yield_from"
3298
]
3399
},
100+
"single_line_empty_body": true,
34101
"trailing_comma_in_multiline": {
35102
"after_heredoc": true,
36103
"elements": [
@@ -41,6 +108,7 @@
41108
]
42109
},
43110
"trim_array_spaces": true,
111+
"type_declaration_spaces": true,
44112
"whitespace_after_comma_in_array": {
45113
"ensure_single_space": true
46114
}

0 commit comments

Comments
 (0)