Skip to content

Commit f77122b

Browse files
committed
Add composer scripts
1 parent b171b74 commit f77122b

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

composer.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,18 @@
4343
"branch-alias": {
4444
"dev-master": "1.0-dev"
4545
}
46+
},
47+
"scripts": {
48+
"all": [
49+
"@fix",
50+
"@analyse",
51+
"@test"
52+
],
53+
"fix": "php-cs-fixer fix",
54+
"analyse": "phpstan analyse --no-progress --level=4 --configuration=phpstan.neon src tests",
55+
"test": [
56+
"\"vendor/bin/codecept\" build",
57+
"\"vendor/bin/codecept\" run"
58+
]
4659
}
4760
}

tests.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@ cd <project_dir>
1212
# install dependencies
1313
composer update
1414
15-
# check coding style
16-
php-cs-fixer fix --dry-run
17-
1815
# fix coding style
19-
php-cs-fixer fix
16+
composer fix
2017
2118
# static analysis
22-
phpstan analyse --level=4 --configuration=phpstan.neon src tests
19+
composer analyse
2320
2421
# run tests
25-
sh ./tests/run.sh
22+
composer test
2623
```
2724

2825
Advanced usage

tests/run.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)