Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Commit

Permalink
Add PHP CodeSniffer checks
Browse files Browse the repository at this point in the history
  • Loading branch information
geerteltink committed Sep 5, 2015
1 parent 7d84639 commit b002d0f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .travis.yml
@@ -0,0 +1,20 @@
sudo: false

language: php

matrix:
fast_finish: true
include:
- php: 5.6
env:
- EXECUTE_CS_CHECK=true

before_script:
- composer self-update
- composer install --prefer-source --no-scripts

script:
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs ; fi

notifications:
email: true
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -14,7 +14,8 @@
"zendframework/zend-expressive": "^0.2"
},
"require-dev": {
"composer/composer": "1.0.0-alpha10"
"composer/composer": "1.0.0-alpha10",
"squizlabs/php_codesniffer": "^2.3"
},
"autoload": {
"psr-4": {
Expand Down
21 changes: 21 additions & 0 deletions phpcs.xml
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<ruleset name="Zend Framework coding standard">
<description>Zend Framework coding standard</description>

<!-- display progress -->
<arg value="p"/>
<arg name="colors"/>

<!-- inherit rules from: -->
<rule ref="PSR2"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="false"/>
</properties>
</rule>

<!-- Paths to check -->
<file>src</file>
<file>test</file>
</ruleset>

0 comments on commit b002d0f

Please sign in to comment.