language: php

php:
    - 5.6
    - 7.0
    - 7.1

before_install:
    - composer self-update
    - composer --version
    - wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer.phar
    - php php-cs-fixer.phar --version

install:
    - COMPOSER_ROOT_VERSION=dev-master composer update --prefer-source

script:
    - if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then php php-cs-fixer.phar fix --dry-run -v; fi
    - vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_script:
    - if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then vendor/bin/coveralls -v; fi
