sudo: false

language: php

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

matrix:
  include:
    - php: 7
      env:
        - EXECUTE_CS_CHECK=true
        - EXECUTE_TEST_COVERALLS=true
    - php: 7.1
  
install:
  - travis_retry composer install --no-interaction

script:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --disallow-test-output --coverage-clover ./clover.xml ; else ./vendor/bin/phpunit --disallow-test-output ; fi
  - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi

after_script:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./clover.xml ; fi

sudo: false

language: php

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

matrix:
  include:
    - php: 7
      env:
        - EXECUTE_CS_CHECK=true
        - EXECUTE_TEST_COVERALLS=true
    - php: 7.1
    - php: 7.2
  
install:
  - travis_retry composer install --no-interaction

script:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --disallow-test-output --coverage-clover ./clover.xml ; else ./vendor/bin/phpunit --disallow-test-output ; fi
  - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi

after_script:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover ./clover.xml ; fi

Include PHP 7.2 in Travis CI matrix
Include PHP 7.2 in Travis CI matrix
