language: php

# php compatibility
php:
  - 5.6
  - 7.0
  - 7.1
  - hhvm

matrix:
  allow_failures:
    - php: hhvm

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

before_script:
  - travis_retry composer self-update
  - travis_retry composer install --no-interaction --prefer-dist
  - test $TRAVIS_PHP_VERSION == '7.0' && travis_retry composer require --dev --no-interaction --prefer-dist scrutinizer/ocular

script:
  - mkdir -p build/tests/
  - vendor/bin/parallel-lint src/ tests/
  - vendor/bin/phpcs -sp src/ tests/
  - vendor/bin/php-cs-fixer fix --using-cache=no --dry-run --verbose
  - vendor/bin/phpunit --coverage-text --coverage-clover=build/tests/coverage.xml

after_script:
  - test $TRAVIS_PHP_VERSION == '7.0' && php vendor/bin/ocular code-coverage:upload --format=php-clover build/tests/coverage.xml

notifications:
  email: false

language: php

# php compatibility
php:
  - 5.6
  - 7.0
  - 7.1
  - hhvm

matrix:
  allow_failures:
    - php: hhvm

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

before_script:
  - travis_retry composer self-update
  - travis_retry composer install --no-interaction --prefer-dist
  - if [[ $TRAVIS_PHP_VERSION == '7.0' ]]; then travis_retry composer require --dev --no-interaction --prefer-dist scrutinizer/ocular; fi

script:
  - mkdir -p build/tests/
  - vendor/bin/parallel-lint src/ tests/
  - vendor/bin/phpcs -sp src/ tests/
  - vendor/bin/php-cs-fixer fix --using-cache=no --dry-run --verbose
  - vendor/bin/phpunit --coverage-text --coverage-clover=build/tests/coverage.xml

after_script:
  - if [[ $TRAVIS_PHP_VERSION == '7.0' ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/tests/coverage.xml; fi

notifications:
  email: false

Revert "change if to test"
Revert "change if to test"

This reverts commit 9fb79df30dbf205a85dedd62fa38b13fd55bad37.
