Skip to content

Commit f542664

Browse files
committed
[TASK] Add a fix Composer script to run all code fixers
This makes our life as developers a bit more convenient. Also run Rector before the style fixer as Rector is responsible for structural changes that need to be style-fixed after that.
1 parent f6feb87 commit f542664

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,12 @@
8585
"ci:tests:coverage": "phpunit --do-not-cache-result --coverage-clover=coverage.xml",
8686
"ci:tests:sof": "phpunit --stop-on-failure --do-not-cache-result",
8787
"ci:tests:unit": "phpunit --do-not-cache-result",
88+
"fix": [
89+
"@fix:php"
90+
],
8891
"fix:php": [
89-
"@fix:php:fixer",
90-
"@fix:php:rector"
92+
"@fix:php:rector",
93+
"@fix:php:fixer"
9194
],
9295
"fix:php:fixer": "\"./.phive/php-cs-fixer\" --config=config/php-cs-fixer.php fix bin src tests",
9396
"fix:php:rector": "rector --config=config/rector.php",
@@ -105,6 +108,7 @@
105108
"ci:tests:coverage": "Runs the unit tests with code coverage.",
106109
"ci:tests:sof": "Runs the unit tests and stops at the first failure.",
107110
"ci:tests:unit": "Runs all unit tests.",
111+
"fix": "Runs all fixers",
108112
"fix:php": "Autofixes all autofixable issues in the PHP code.",
109113
"fix:php:fixer": "Fixes autofixable issues found by PHP CS Fixer.",
110114
"fix:php:rector": "Fixes autofixable issues found by Rector.",

0 commit comments

Comments
 (0)