Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add phpcs to travis to check that code matches zend style #47

wants to merge 1 commit into from

3 participants


This adds CodeSniff to travis to complain when stuff gets off the style guide. Will need to be changed based on #43. I also updated it to use the git repo instead of downloading from sourceforge. The codesniff only needs to be run on one copy so so I force it on 5.5.


Hmm, any idea why the first build fails with Fatal error: Class 'Phar' not found in /home/travis/.phpenv/versions/5.2.17/bin/composer.phar on line 13?


It's existing behaviour (it's happening on other builds as well). The probably changed what they have on php5.2 since the travis config was update. They have this warning I could just not do much on 5.2?


Added phpcs to the build (only on 5.6) based off of your diff, as well as fixing some style issues that built up over the last 3 months. Thanks!

@bkrausz bkrausz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 3 deletions.
  1. +5 −2 .travis.yml
  2. +2 −1  composer.json
7 .travis.yml
@@ -7,6 +7,9 @@ php:
- 5.5
- - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then wget; tar xf simpletest_1.1.0.tar.gz -C test; else composer install --dev --prefer-source; fi"
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.2' ]; then pyrus install && pear install pear/PHP_CodeSniffer && phpenv rehash; fi"
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then git clone test/simpletest; else composer install --dev --prefer-source; fi"
-script: php test/Stripe.php
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.5' ]; then phpcs --standard=zend --encoding=UTF-8 --report=summary --ignore=*/vendor/* -p; fi"
+ - php test/Stripe.php
3  composer.json
@@ -21,7 +21,8 @@
"ext-mbstring": "*"
"require-dev": {
- "vierbergenlars/simpletest": "*"
+ "vierbergenlars/simpletest": "*",
+ "squizlabs/php_codesniffer": "*"
"autoload": {
"classmap": ["lib/Stripe/"]
Something went wrong with that request. Please try again.