language: php

php:
  - 5.5
  - 5.6
  - 7.0
  - nightly

cache:
  directories:
    - vendor

install:
  - phpenv config-rm xdebug.ini
  - composer self-update
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then composer require --dev --no-update phpunit/phpunit ^4; fi
  - composer require satooshi/php-coveralls dev-master --dev --no-update
  - composer update --ignore-platform-reqs
  - composer show --installed

script:
  - find -name "*.php" -exec php -l {} \;
  - $(php -r 'if (PHP_MAJOR_VERSION >= 7) echo "phpdbg -qrr"; else echo "php";') vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
  - php vendor/bin/php-cs-fixer --diff --dry-run -v fix
  - php vendor/bin/phpdoc -d lib/ --log info --validate --force --visibility public,protected --template responsive

after_script:
  - php vendor/bin/coveralls -v

language: php

php:
  - 5.5
  - 5.6
  - 7.0
  - nightly

cache:
  directories:
    - vendor

install:
  - phpenv config-rm xdebug.ini
  - composer self-update
  - if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.5" ]]; then composer require --dev --no-update phpunit/phpunit ^4; fi
  - composer require satooshi/php-coveralls dev-master --dev --no-update
  - composer update --ignore-platform-reqs
  - composer show --installed

script:
  - find -name "*.php" -not -path "./vendor/*" -print0 | xargs -n 1 -0 php -l
  - $(php -r 'if (PHP_MAJOR_VERSION >= 7) echo "phpdbg -qrr"; else echo "php";') vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
  - php vendor/bin/php-cs-fixer --diff --dry-run -v fix
  - php vendor/bin/phpdoc -d lib/ --log info --validate --force --visibility public,protected --template responsive

after_script:
  - php vendor/bin/coveralls -v

Enable syntax check on Travis
Enable syntax check on Travis
