language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7

before_script:
  - composer update --prefer-source

script:
  - ./vendor/bin/phpunit
  - ./vendor/bin/phpcs --standard=PSR2 --ignore="test/Bootstrap.php" ./src/ ./test/

after_script:
  - if [ $TRAVIS_PHP_VERSION != 'hhvm' ] && [ $TRAVIS_PHP_VERSION != '7' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [ $TRAVIS_PHP_VERSION != 'hhvm' ] && [ $TRAVIS_PHP_VERSION != '7' ]; then php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi

notifications:
  email: false
