language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - hhvm

before_install:
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then rm phpunit.xml; fi;'
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then mv phpunit.hhvm.xml phpunit.xml; fi;'

install:
  - travis_retry composer install --no-interaction --prefer-source

script:
  - bin/phpunit

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