language: php
sudo: false

php:
  - 5.6
  - 5.5
  - 5.4
  - 7.0
  - hhvm

cache:
  directories:
  - vendor

before_install:
  - composer self-update

install:
  - composer require --no-update --no-interaction "phpunit/phpunit:*" "squizlabs/php_codesniffer:*" "fabpot/php-cs-fixer:*"
  - travis_retry composer update --no-interaction --prefer-source
  - travis_retry wget https://scrutinizer-ci.com/ocular.phar

before_script:
  - if [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi

script:
  - if [[ $TRAVIS_PHP_VERSION =~ ^7 ]]; then
      phpdbg -qrr vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.clover --coverage-text;
    else
      vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text;
    fi
  - vendor/bin/phpcs --standard=PSR2 src tests
  - vendor/bin/php-cs-fixer fix --dry-run --diff

after_script:
  - if [[ ! $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then
      php ocular.phar code-coverage:upload --format=php-clover coverage.clover;
    fi

language: php
sudo: false

php:
  - 5.6
  - 5.5
  - 5.4
  - 7.0
  - hhvm

cache:
  directories:
  - vendor

before_install:
  - if [[ $TRAVIS_PHP_VERSION =~ ^7 ]]; then phpenv config-rm xdebug.ini; fi
  - composer self-update

install:
  - composer require --no-update --no-interaction "phpunit/phpunit:*" "squizlabs/php_codesniffer:*" "fabpot/php-cs-fixer:*"
  - travis_retry composer update --no-interaction --prefer-source
  - travis_retry wget https://scrutinizer-ci.com/ocular.phar

before_script:
  - if [[ $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then echo 'xdebug.enable = On' >> /etc/hhvm/php.ini; fi

script:
  - if [[ $TRAVIS_PHP_VERSION =~ ^7 ]]; then
      phpdbg -qrr vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.clover --coverage-text;
    else
      vendor/bin/phpunit --coverage-clover=coverage.clover --coverage-text;
    fi
  - vendor/bin/phpcs --standard=PSR2 src tests
  - vendor/bin/php-cs-fixer fix --dry-run --diff

after_script:
  - if [[ ! $TRAVIS_PHP_VERSION =~ ^hhvm ]]; then
      php ocular.phar code-coverage:upload --format=php-clover coverage.clover;
    fi

Disable xdebug on php 7 build
Disable xdebug on php 7 build
