language: php

php:
    - 5.4
    - 5.5
    - 5.6
    - hhvm
    - hhvm-nightly

# Faster builds on new travis setup not using sudo
sudo: false

matrix:
    allow_failures:
        - php: hhvm
        - php: hhvm-nightly

before_install:
    - travis_retry composer self-update && composer --version

install:
    - travis_retry composer --dev --no-interaction install

script:
    - sh -c "if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./bin/phpunit; fi"
    - sh -c "if [ "$TRAVIS_PULL_REQUEST" = "false" ];  then ./bin/phpunit --coverage-clover=coverage.clover; fi"

after_script:
    - sh -c "if [ "$TRAVIS_PHP_VERSION" = "5.6" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
    - sh -c "if [ "$TRAVIS_PHP_VERSION" = "5.6" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"

language: php

php:
    - 5.4
    - 5.5
    - 5.6
    - hhvm
    - hhvm-nightly

# Faster builds on new travis setup not using sudo
sudo: false

matrix:
    allow_failures:
        - php: hhvm
        - php: hhvm-nightly

before_install:
    - travis_retry composer self-update && composer --version

install:
    - travis_retry composer --dev --no-interaction install

script:
    #- sh -c "if [ '$TRAVIS_PULL_REQUEST' != 'false' ]; then ./bin/phpunit; fi"
    - sh -c "if [ '$TRAVIS_PHP_VERSION' != '5.6' ]; then ./bin/phpunit; fi"
    #- sh -c "if [ '$TRAVIS_PULL_REQUEST' = 'false' ];  then ./bin/phpunit --coverage-clover=coverage.clover; fi"
    - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.6' ];  then ./bin/phpunit --coverage-clover=coverage.clover; fi"

after_script:
    - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.6' ] && [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
    - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.6' ] && [ '$TRAVIS_PULL_REQUEST' = 'false' ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"

Fix " and ' and only execute coverage if it is not PHP 5.6
Fix " and ' and only execute coverage if it is not PHP 5.6
