From ed9322e30921070f469a66faa7f401aa9bb13de9 Mon Sep 17 00:00:00 2001 From: jmsche Date: Fri, 29 May 2020 11:43:51 +0200 Subject: [PATCH 1/2] Shorter (relevant) diff by php-cs-fixer for Travis CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9babd77..365ee59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,7 @@ before_script: script: - | if [[ "$WITH_CS" == "true" ]]; then - vendor/bin/php-cs-fixer fix --config=.php_cs.dist --verbose --diff --dry-run + vendor/bin/php-cs-fixer fix --config=.php_cs.dist --verbose --diff --dry-run --diff-format=udiff fi - | if [[ "$WITH_PHPUNIT" == "true" ]]; then From 9ab0b10a0f9343bb149571a82f128abb62e4b19a Mon Sep 17 00:00:00 2001 From: jmsche Date: Fri, 29 May 2020 11:55:08 +0200 Subject: [PATCH 2/2] Contributing: added info about code style --- CONTRIBUTING.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8fa35c5..5db0f6e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,7 +68,21 @@ This will add your changes on top of what's already in upstream, minimizing merg Make sure that all tests are passing before submitting a pull request. -### Step 8: Send the pull request +### Step 8: Fix code style + +Run the following command to check the code style of your changes: + +``` +vendor/bin/php-cs-fixer fix --config=.php_cs.dist --verbose --diff --dry-run --diff-format=udiff +``` + +This will print a diff of proposed code style changes. To apply these suggestions, run the following command: + +``` +vendor/bin/php-cs-fixer fix --config=.php_cs.dist +``` + +### Step 9: Send the pull request Send the pull request from your feature branch to us. Be sure to include a description that lets us know what work you did.