Skip to content

Commit

Permalink
Automatic CS tests after PSR2
Browse files Browse the repository at this point in the history
  • Loading branch information
lsolesen committed May 4, 2016
1 parent 93ddf17 commit 7a9f7f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ install:

script:
- ./vendor/bin/phpunit -c ./phpunit.xml --coverage-text --strict
- ./vendor/bin/phpcs --standard=phpcs.xml src -s
- ./vendor/bin/phpcs --standard=phpcs.xml tests -s
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"symfony/validator": ">=2.3",
"symfony/intl": ">=2.3",
"phpunit/phpunit": "~4.0",
"mikey179/vfsStream": "1.*"
"mikey179/vfsStream": "1.*",
"squizlabs/php_codesniffer": "2.*"
},
"suggest": {
"commerceguys/intl": "to use it as the source of country data",
Expand Down
12 changes: 12 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0"?>
<ruleset name="Modfied PSR2">

<description>PSR2 excluding line length</description>

<rule ref="PSR2"/>

<!-- The following rules should be kept excluded -->
<rule ref="Generic.Files.LineLength.TooLong">
<severity>0</severity>
</rule>
</ruleset>

0 comments on commit 7a9f7f3

Please sign in to comment.