language: php

php:
  - 5.6
  - 7
  - 7.1
  - 7.2
  - 7.3
  - 7.4snapshot

dist: trusty

before_install:
  - composer selfupdate

install:
  - composer install --prefer-source --dev

script:
  - php vendor/bin/phpunit
  - php vendor/bin/phpcs -n --standard=PSR1,PSR2 --report=full src/

after_success:
  - wget https://scrutinizer-ci.com/ocular.phar
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" && "$TRAVIS_PHP_VERSION" !== "nightly" ] && [ "$TRAVIS_PHP_VERSION" != "nightly"  ]; then php ocular.phar code-coverage:upload --format=php-clover build/docs/clover.xml; fi;'

matrix:
    fast_finish: true
