Skip to content

Commit 2fe7b9f

Browse files
committed
Add runnable commands to compose.json
1 parent 309d3bd commit 2fe7b9f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

composer.json

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
"type": "project",
44
"minimum-stability": "beta",
55
"homepage": "https://enqueue.forma-pro.com/",
6+
"scripts": {
7+
"cs-fix": "bin/php-cs-fixer fix --config=.php_cs.php",
8+
"cs-lint": "bin/php-cs-fixer fix --config=.php_cs.php --no-interaction --dry-run --diff",
9+
"phpstan": "bin/phpstan analyse --memory-limit=512M -c phpstan.neon"
10+
},
611
"require": {
712
"php": "^7.1.3",
813

docs/contribution.md

+6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ composer install
2121

2222
Once you did it you can work on a feature or bug fix.
2323

24+
If you need, you can also use composer scripts to run code linting and static analysis:
25+
* For code style linting, run `composer run cs-lint`. Optionally add file names:
26+
`composer run cs-lint pkg/null/NullTopic.php` for example.
27+
* You can also fix your code style with `composer run cs-fix`.
28+
* Static code analysis can be run using `composer run phpstan`. As above, you can pass specific files.
29+
2430
## Testing
2531

2632
To run tests

0 commit comments

Comments
 (0)