Skip to content

Commit

Permalink
Add PHPCS configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed Dec 17, 2018
1 parent 7d6f8c5 commit 7cfef66
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -26,8 +26,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"
},
"config": {
"sort-packages": true
Expand Down
14 changes: 14 additions & 0 deletions phpcs.xml.dist
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<ruleset name="arionum-cli">
<description>The coding standard of arionum-cli 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>
6 changes: 3 additions & 3 deletions phpunit.xml.dist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
<phpunit bootstrap="tests/bootstrap.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
Expand All @@ -10,7 +10,7 @@
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="pxgamer Test Suite">
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand All @@ -22,7 +22,7 @@
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-html" target="build/coverage"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
Expand Down

0 comments on commit 7cfef66

Please sign in to comment.