language: php

sudo: false

php: [5.3, 5.4, 5.5, 5.6, nightly, hhvm]

matrix:
  fast_finish: true
  allow_failures:
    - php: nightly

cache:
  directories:
    - $HOME/.composer/cache

install:
  - composer install

script: phpunit -v --coverage-clover=coverage.clover

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover

language: php

sudo: false

php: [5.3, 5.4, 5.5, 5.6, nightly, hhvm]

matrix:
  fast_finish: true
  allow_failures:
    - php: nightly

cache:
  directories:
    - $HOME/.composer/cache

install:
  - composer install

script: phpunit -v --coverage-clover=coverage.clover

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

Disable the code coverage upload on PHP nightly
Disable the code coverage upload on PHP nightly

PHP nightly does not have XDebug and so cannot upload code coverage.
This check avoids notifying scrutinizer that there is no coverage in
case the PHP nightly job finishes first.
