Skip to content

Commit ba9ee3a

Browse files
committed
Housecleaning
1 parent bd3892d commit ba9ee3a

File tree

3 files changed

+17
-39
lines changed

3 files changed

+17
-39
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ test_quality:
2020
- composer install
2121
- vendor/bin/phpcs --standard=PSR12 -n src
2222
# - vendor/bin/phpcs --standard=PSR12 -n tests --exclude=PSR1.Methods.CamelCapsMethodName
23-
- vendor/bin/phpstan analyse
23+
- composer check-static

captainhook.json

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,18 @@
11
{
2-
"commit-msg": {
3-
"enabled": true,
4-
"actions": []
5-
},
6-
"pre-push": {
7-
"enabled": false,
8-
"actions": []
9-
},
102
"pre-commit": {
113
"enabled": true,
124
"actions": [
135
{
14-
"action": "vendor/bin/phpcbf --standard=PSR12 src",
15-
"options": []
16-
},
17-
{
18-
"action": "vendor/bin/phpstan analyze",
19-
"options": []
6+
"action": "composer format"
207
}
218
]
229
},
23-
"prepare-commit-msg": {
24-
"enabled": false,
25-
"actions": []
26-
},
27-
"post-commit": {
28-
"enabled": false,
29-
"actions": []
30-
},
31-
"post-merge": {
32-
"enabled": false,
33-
"actions": []
34-
},
35-
"post-checkout": {
36-
"enabled": false,
37-
"actions": []
38-
},
39-
"post-rewrite": {
40-
"enabled": false,
41-
"actions": []
42-
},
43-
"post-change": {
10+
"pre-push": {
4411
"enabled": false,
45-
"actions": []
12+
"actions": [
13+
{
14+
"action": "composer check-static"
15+
}
16+
]
4617
}
4718
}

composer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@
3636
},
3737
"require-dev": {
3838
"phpstan/phpstan": "^1.10",
39-
"squizlabs/php_codesniffer": "^3.7",
40-
"captainhook/captainhook": "^5.16"
39+
"captainhook/captainhook": "^5.16",
40+
"phpcsstandards/php_codesniffer": "^3.7"
41+
},
42+
"scripts": {
43+
"check-static": "phpstan",
44+
"format": "phpcbf --standard=PSR12 src",
45+
"post-autoload-dump": [
46+
"vendor/bin/captainhook install -f -s"
47+
]
4148
}
4249
}

0 commit comments

Comments
 (0)