From c1b61706016534df1d8e3b855435809a83168737 Mon Sep 17 00:00:00 2001 From: Lars Olesen Date: Sat, 30 Apr 2016 10:01:36 +0000 Subject: [PATCH] Added actual coding standards based on PSR2 Closes #1183 --- .travis.yml | 4 +- composer.json | 3 +- phpcs.xml | 142 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 phpcs.xml diff --git a/.travis.yml b/.travis.yml index 7c94a4ea8..351177a3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,9 @@ php: install: travis_retry composer install --no-interaction --prefer-source -script: vendor/bin/phpunit +script: + - vendor/bin/phpunit + - vendor/bin/phpcs --standard=phpcs.xml src matrix: allow_failures: diff --git a/composer.json b/composer.json index 92eb41c35..c3d200fd0 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,8 @@ "phenx/php-svg-lib": "0.1.*" }, "require-dev": { - "phpunit/phpunit": "3.7.*" + "phpunit/phpunit": "3.7.*", + "squizlabs/php_codesniffer": "2.*" }, "extra": { "branch-alias": { diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 000000000..fbda3fd25 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,142 @@ + + + + Coding standard ruleset based on the PSR-2 coding standard. + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + +