From d6d2c91ae48db41dc37e6a51fe3d1cc8565ba21d Mon Sep 17 00:00:00 2001 From: George Mponos Date: Tue, 6 Nov 2018 23:23:35 +0200 Subject: [PATCH 1/2] Added a phpcs.xml.dist file --- composer.json | 6 +++--- phpcs.xml.dist | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 phpcs.xml.dist diff --git a/composer.json b/composer.json index 35e0b58..1a12a93 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "require-dev": { "phpunit/phpunit" : ">=5.4.3", - "squizlabs/php_codesniffer": "^2.3" + "squizlabs/php_codesniffer": "^3.0" }, "autoload": { "psr-4": { @@ -35,8 +35,8 @@ }, "scripts": { "test": "phpunit", - "check-style": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests", - "fix-style": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests" + "check-style": "phpcs src tests", + "fix-style": "phpcbf src tests" }, "extra": { "branch-alias": { diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..989f840 --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,14 @@ + + + The coding standard of :package_name package + + + + + + + + + + + \ No newline at end of file From 986054dc298d9387200beee1f51aabc52a55446d Mon Sep 17 00:00:00 2001 From: George Mponos Date: Tue, 6 Nov 2018 23:26:04 +0200 Subject: [PATCH 2/2] Add phpcs to gitignore and gitattributes file --- .gitattributes | 1 + .gitignore | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 3286141..5320baa 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,6 +5,7 @@ /.gitattributes export-ignore /.gitignore export-ignore /.travis.yml export-ignore +/phpcs.xml.dist export-ignore /phpunit.xml.dist export-ignore /.scrutinizer.yml export-ignore /tests export-ignore diff --git a/.gitignore b/.gitignore index 073e37a..a064c15 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ build composer.lock vendor +phpcs.xml +phpunit.xml \ No newline at end of file