language: php

matrix:
    include:
        # Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version
        - php: hhvm-nightly
          sudo: required
          dist: trusty
          group: edge
        - php: 5.3
          env: lowest=1
        - php: 5.4
        - php: 5.5
        - php: 5.6
        - php: 7.0
        - php: 7.1

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

install:
  - if [ "$lowest" = "1" ]; then composer update --prefer-lowest --prefer-stable; else composer install; fi;

script:
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover tests; else vendor/bin/phpunit; fi;'

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

language: php

matrix:
    include:
        # Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version
        - php: hhvm-nightly
          sudo: required
          dist: trusty
          group: edge
        - php: 5.3
          env: lowest=1
        - php: 5.4
        - php: 5.5
        - php: 5.6
        - php: 7.0
        - php: 7.1

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

install:
  - if [ "$lowest" = "1" ]; then composer update --prefer-lowest --prefer-stable; else composer install; fi;

script:
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover tests; else vendor/bin/phpunit; fi;'

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

Fix Travis conditionals to correctly check against HHVM
Fix Travis conditionals to correctly check against HHVM
