Skip to content

Commit a99d876

Browse files
committed
pint
1 parent 927f02d commit a99d876

File tree

3 files changed

+123
-12
lines changed

3 files changed

+123
-12
lines changed

.github/workflows/php-cs-fixer.yml renamed to .github/workflows/pint.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,26 @@ on:
66

77
jobs:
88

9-
php-cs-fixer:
9+
pint:
1010
runs-on: ubuntu-latest
1111
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'skip lint')"
1212

1313
strategy:
1414
matrix:
15-
php-version: [ 8.1 ]
15+
php-version: [ 8.2 ]
1616
#dependency-versions: [ lowest, highest ]
1717
dependency-versions: [ lowest ]
1818

1919
name: PHP ${{ matrix.php-version }} | ${{ matrix.dependency-versions }}
2020
steps:
2121
- name: Checkout project
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323

2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
2626
with:
2727
php-version: ${{ matrix.php-version }}
28-
tools: composer:v2, php-cs-fixer
28+
tools: composer:v2
2929

3030
#- name: Add HTTP Basic Auth Credentials
3131
# run: echo '${{ secrets.COMPOSER_AUTH_JSON }}' > $GITHUB_WORKSPACE/auth.json

.php-cs-fixer.dist.php

-8
This file was deleted.

pint.json

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"preset": "laravel",
3+
"rules": {
4+
"declare_strict_types": false,
5+
"phpdoc_no_empty_return": false,
6+
"single_trait_insert_per_statement": true,
7+
"binary_operator_spaces": {
8+
"default": "single_space",
9+
"operators": {
10+
"|": "no_space"
11+
}
12+
},
13+
"not_operator_with_space": false,
14+
"blank_line_before_statement": {
15+
"statements": [
16+
"break",
17+
"continue",
18+
"declare",
19+
"return",
20+
"throw",
21+
"try"
22+
]
23+
},
24+
"concat_space": {
25+
"spacing": "one"
26+
},
27+
"no_trailing_comma_in_singleline": {
28+
"elements": [
29+
"arguments",
30+
"array_destructuring",
31+
"array",
32+
"group_import"
33+
]
34+
},
35+
"phpdoc_annotation_without_dot": true,
36+
"phpdoc_trim_consecutive_blank_line_separation": false,
37+
"phpdoc_var_annotation_correct_order": true,
38+
"blank_lines_before_namespace": {
39+
"min_line_breaks": 2,
40+
"max_line_breaks": 2
41+
},
42+
"visibility_required": {
43+
"elements": [
44+
"property",
45+
"method",
46+
"const"
47+
]
48+
},
49+
"global_namespace_import": {
50+
"import_classes": true,
51+
"import_constants": null,
52+
"import_functions": null
53+
},
54+
"phpdoc_order": {
55+
"order": [
56+
"noinspection",
57+
"deprecated",
58+
"author",
59+
"copyright",
60+
"license",
61+
"see",
62+
"link",
63+
"todo",
64+
"example",
65+
"property",
66+
"method",
67+
"api",
68+
"template",
69+
"phpstan-template",
70+
"param",
71+
"phpstan-param",
72+
"phpstan-return",
73+
"return",
74+
"throws"
75+
]
76+
},
77+
"phpdoc_separation": {
78+
"groups": [
79+
[
80+
"noinspection"
81+
],
82+
[
83+
"deprecated",
84+
"link",
85+
"see",
86+
"since"
87+
],
88+
[
89+
"author",
90+
"copyright",
91+
"license"
92+
],
93+
[
94+
"category",
95+
"package",
96+
"subpackage"
97+
],
98+
[
99+
"throws"
100+
],
101+
[
102+
"property",
103+
"property-read",
104+
"property-write"
105+
],
106+
[
107+
"phpstan-template",
108+
"template",
109+
"param",
110+
"phpstan-param"
111+
],
112+
[
113+
"phpstan-return",
114+
"return"
115+
]
116+
]
117+
}
118+
}
119+
}

0 commit comments

Comments
 (0)