From 40aacb2e61fb06837ff8f1bc789bf8d09329b514 Mon Sep 17 00:00:00 2001 From: sunxyw <31698606+sunxyw@users.noreply.github.com> Date: Wed, 30 Mar 2022 22:55:20 +0800 Subject: [PATCH] refactor git hooks config --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index fea99826..10dee766 100644 --- a/composer.json +++ b/composer.json @@ -73,10 +73,10 @@ "post-merge": "composer install", "pre-commit": [ "echo committing as $(git config user.name)", - "./vendor/bin/php-cs-fixer fix --dry-run --diff ./src" + "composer cs-fix -- --diff" ], "pre-push": [ - "./vendor/bin/php-cs-fixer fix --dry-run --diff ./src", + "composer cs-fix -- --dry-run --diff", "composer analyse" ] }, @@ -91,8 +91,8 @@ "post-install-cmd": [ "[ $COMPOSER_DEV_MODE -eq 0 ] || vendor/bin/cghooks add" ], - "analyse": "phpstan analyse --memory-limit 300M -l 0 ./src", - "cs-fix": "php-cs-fixer fix $1", + "analyse": "phpstan analyse --memory-limit 300M", + "cs-fix": "php-cs-fixer fix", "test": "bin/phpunit-swoole --no-coverage" } }