language: php

php:
  - 7.2
  - 7.3

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

before_script:
  - travis_retry composer update --no-interaction --prefer-dist

script:
  - if [ $(phpenv version-name) == "7.1" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; else vendor/bin/phpunit --no-coverage; fi

after_script:
  - if [ $(phpenv version-name) == "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [ $(phpenv version-name) == "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

matrix:
  allow_failures:
  - php: 7.2

language: php

php:
  - 7.2
  - 7.3

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

before_script:
  - travis_retry composer update --no-interaction --prefer-dist

script:
  - if [ $(phpenv version-name) == "7.1" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; else vendor/bin/phpunit --no-coverage; fi

after_script:
  - if [ $(phpenv version-name) == "7.3" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [ $(phpenv version-name) == "7.3" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

matrix:
  allow_failures:
  - php: 7.2

Fix coverage runs, use a used php version
Fix coverage runs, use a used php version
