Added a phpcs.xml.dist file

This commit is contained in:
George Mponos 2018-11-06 23:23:35 +02:00
parent 04ab224bf8
commit d6d2c91ae4
2 changed files with 17 additions and 3 deletions

View File

@ -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": {

14
phpcs.xml.dist Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<ruleset name=":package_name">
<description>The coding standard of :package_name package</description>
<arg value="p" />
<config name="ignore_warnings_on_exit" value="1" />
<config name="ignore_errors_on_exit" value="1" />
<arg name="colors" />
<arg value="s" />
<!-- Use the PSR2 Standard-->
<rule ref="PSR2" />
</ruleset>