From bbd083ffc9c5f5a08d9ca6fa86ff3fc32c3203fe Mon Sep 17 00:00:00 2001 From: Eugene Kirillov Date: Fri, 16 Mar 2018 15:42:32 +0200 Subject: [PATCH] Update contributing.md --- CONTRIBUTING.md | 16 +++++++++++++++- composer.json | 4 ++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ced8d6..629649d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,4 +27,18 @@ The amphp project adheres to the PSR-2 style guide with the exception that opening braces for classes and methods must appear on the same line as the declaration: -https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md \ No newline at end of file +https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md + +To apply amphp code standards you can run `php-cs-fixer` with following composer command: + +```bash +composer code-style +``` + +## Running the tests + +Run the test suite from amphp root directory: + +```bash +composer test +``` diff --git a/composer.json b/composer.json index 1769984..e9dd204 100644 --- a/composer.json +++ b/composer.json @@ -69,5 +69,9 @@ "platform": { "php": "7.0.0" } + }, + "scripts": { + "test": "@php -dzend.assertions=1 -dassert.exception=1 ./vendor/bin/phpunit", + "code-style": "@php ./vendor/bin/php-cs-fixer fix" } }