language: php

php:
  - 7.1
  - 7.2
  - 7.3

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

env:
  global:
    - setup=basic

install:
  - if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi

script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text