language: php

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

php:
  - 7.1
  - 7.2
  - 7.3
  - 7.4

matrix:
  fast_finish: true

before_install:
  - composer self-update

install:
  - composer update --prefer-dist --prefer-stable --no-interaction

script:
  - vendor/bin/phpstan --level=max --memory-limit="-1" --no-progress analyze
  - vendor/bin/php-cs-fixer fix --diff --dry-run
  - vendor/bin/phpunit --stderr --coverage-clover=build/coverage.xml

after_success:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml

notifications:
  email: false

language: php

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

php:
  - 7.1
  - 7.2
  - 7.3
  - 7.4

matrix:
  fast_finish: true
  include:
    # Run test with code coverage
    - php: 7.1
      env: COVERAGE=true

before_install:
  - composer self-update

install:
  - composer update --prefer-dist --prefer-stable --no-interaction

script:
  - vendor/bin/phpstan --level=max --memory-limit="-1" --no-progress analyze
  - vendor/bin/php-cs-fixer fix --diff --dry-run
  - vendor/bin/phpunit --stderr --coverage-clover=build/coverage.xml

after_success:
  - if [[ $COVERAGE = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [[ $COVERAGE = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

notifications:
  email: false

Update Travis configuration for Coverage
Update Travis configuration for Coverage
