Merge pull request #130 from gmponos/add_phpcs_xml_dist

Added a phpcs.xml.dist file
This commit is contained in:
Frank de Jonge 2018-11-06 22:34:19 +01:00 committed by GitHub
commit fd6738d5c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 3 deletions

1
.gitattributes vendored
View file

@ -5,6 +5,7 @@
/.gitattributes export-ignore /.gitattributes export-ignore
/.gitignore export-ignore /.gitignore export-ignore
/.travis.yml export-ignore /.travis.yml export-ignore
/phpcs.xml.dist export-ignore
/phpunit.xml.dist export-ignore /phpunit.xml.dist export-ignore
/.scrutinizer.yml export-ignore /.scrutinizer.yml export-ignore
/tests export-ignore /tests export-ignore

2
.gitignore vendored
View file

@ -1,3 +1,5 @@
build build
composer.lock composer.lock
vendor vendor
phpcs.xml
phpunit.xml

View file

@ -21,7 +21,7 @@
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit" : ">=5.4.3", "phpunit/phpunit" : ">=5.4.3",
"squizlabs/php_codesniffer": "^2.3" "squizlabs/php_codesniffer": "^3.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
@ -35,8 +35,8 @@
}, },
"scripts": { "scripts": {
"test": "phpunit", "test": "phpunit",
"check-style": "phpcs -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 -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 src tests" "fix-style": "phpcbf src tests"
}, },
"extra": { "extra": {
"branch-alias": { "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>