language: php

php:
  - 5.4
  - 5.5
  - 5.6

before_script:
  - sh -c "pear channel-discover pear.cakephp.org"
  - sh -c "pear install PHP_CodeSniffer"
  - sh -c "pear install --alldeps cakephp/CakePHP_CodeSniffer"
  - phpenv rehash

script:
  - sh -c "phpcs -p --extensions=php --standard=CakePHP ./src ./tests ./webroot"

notifications:
  email: false

language: php

php:
  - 5.4
  - 5.5
  - 5.6

before_script:
  - sh -c "composer global require 'cakephp/cakephp-codesniffer:*'"
  - phpenv rehash

script:
  - sh -c "~/.composer/vendor/bin/phpcs -p --extensions=php --standard=~/.composer/vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./webroot"

notifications:
  email: false

Use composer instead of PEAR to get codesniffer.
Use composer instead of PEAR to get codesniffer.
