From d9da796f118400fa891aa9be7978dea8cc1535ad Mon Sep 17 00:00:00 2001 From: Claudio Sanches Date: Wed, 29 Nov 2017 18:10:54 -0200 Subject: [PATCH] Introduces a few composer scripts for PHPUnit and PHP_CodeSniffer --- composer.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/composer.json b/composer.json index 6b5edf1febc..e2cb5aff630 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,22 @@ ], "post-update-cmd": [ "WooCommerce\\GitHooks\\Hooks::postHooks" + ], + "test": [ + "phpunit" + ], + "phpcs": [ + "phpcs -s -p --standard=./phpcs.ruleset.xml" + ], + "phpcbf": [ + "phpcs -p --standard=./phpcs.ruleset.xml" ] + }, + "extra": { + "scripts-description": { + "test": "Run unit tests", + "phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer", + "phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier" + } } }