From 235b063d3d84f4258ce394a1f2b6626768da1666 Mon Sep 17 00:00:00 2001 From: fmizzell Date: Wed, 31 Jul 2019 09:51:16 -0500 Subject: [PATCH] Add pre-commit hooks to maintain PSR-2 compliance. (#5) --- composer.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 00db6e3..e91801f 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,18 @@ "ContractsTest\\": "test/" } }, - "require-dev": { - "phpunit/phpunit": "^7.5" + "require-dev": { + "phpunit/phpunit": "^7.5", + "bugatino/phpcs-git-pre-commit": "dev-master", + "squizlabs/php_codesniffer": "^3.4" + }, + "scripts": { + "post-install-cmd": [ + "sh ./vendor/bugatino/phpcs-git-pre-commit/src/setup.sh" + ], + "post-update-cmd": [ + "sh ./vendor/bugatino/phpcs-git-pre-commit/src/setup.sh" + ] }, "license": "GPL-3.0-only", "authors": [