language: php

php:
  - 5.4
  - 5.5
  - 5.6

matrix:
  fast_finish: true
  include:
    - php: 5.4
      env: PHPCS=1 DEFAULT=0

before_script:
  - composer self-update

  - sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:*; fi"

  - composer install --prefer-dist --no-interaction --dev

  - phpenv rehash
  - set +H

script:
  - sh -c "if [ '$PHPCS' != '1' ]; then phpunit --stderr; fi"
  - sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=/home/travis/.composer/vendor/cakephp/cakephp-codesniffer/CakePHP --ignore=vendor . ; fi"

notifications:
  email: false

language: php

php:
  - 5.4
  - 5.5
  - 5.6

matrix:
  fast_finish: true
  include:
    - php: 5.4
      env: PHPCS=1 DEFAULT=0

before_script:
  - composer self-update

  - sh -c "if [ '$PHPCS' = '1' ]; then composer require cakephp/cakephp-codesniffer:*; fi"

  - composer install --prefer-dist --no-interaction --dev

  - sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs --config-set installed_paths ./vendor/cakephp/cakephp-codesniffer; fi"

  - phpenv rehash
  - set +H

script:
  - sh -c "if [ '$PHPCS' != '1' ]; then phpunit --stderr; fi"
  - sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -p --extensions=php --standard=CakePHP ./src ./tests; fi"

notifications:
  email: false

Change phpcs configs path as specfying path for standard doesn't seem to be working
Change phpcs configs path as specfying path for standard doesn't seem to be working
