From 7a9f7f32e95ed7c340623214ba0e68e1b60c8c04 Mon Sep 17 00:00:00 2001 From: Lars Olesen Date: Wed, 4 May 2016 06:22:01 +0000 Subject: [PATCH] Automatic CS tests after PSR2 --- .travis.yml | 2 ++ composer.json | 3 ++- phpcs.xml | 12 ++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 phpcs.xml diff --git a/.travis.yml b/.travis.yml index 20bf1805..58ac501f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,3 +12,5 @@ install: script: - ./vendor/bin/phpunit -c ./phpunit.xml --coverage-text --strict + - ./vendor/bin/phpcs --standard=phpcs.xml src -s + - ./vendor/bin/phpcs --standard=phpcs.xml tests -s diff --git a/composer.json b/composer.json index 58733143..34a4d982 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,8 @@ "symfony/validator": ">=2.3", "symfony/intl": ">=2.3", "phpunit/phpunit": "~4.0", - "mikey179/vfsStream": "1.*" + "mikey179/vfsStream": "1.*", + "squizlabs/php_codesniffer": "2.*" }, "suggest": { "commerceguys/intl": "to use it as the source of country data", diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 00000000..76f83374 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,12 @@ + + + + PSR2 excluding line length + + + + + + 0 + +