sudo: false

language: php

cache:
  directories:
    - $HOME/.composer/cache
    - vendor

matrix:
  fast_finish: true
  include:
    - php: 5.5
      env:
        - EXECUTE_CS_CHECK=true
    - php: 5.6
      env:
        - EXECUTE_TEST_COVERALLS=true
    - php: 7
    - php: hhvm
  allow_failures:
    - php: hhvm

before_install:
  - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
  - composer self-update
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:dev-master ; fi

install:
  - travis_retry composer install --no-interaction
  - composer info -i

script:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer test-coverage ; fi
  - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then composer test ; fi
  - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then composer cs ; fi

after_script:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer coveralls ; fi

sudo: false

language: php

cache:
  directories:
    - $HOME/.composer/cache
    - vendor

matrix:
  fast_finish: true
  include:
    - php: 5.5
      env:
        - EXECUTE_CS_CHECK=true
    - php: 5.6
      env:
        - EXECUTE_TEST_COVERALLS=true
    - php: 7
    - php: hhvm
  allow_failures:
    - php: hhvm

before_install:
  - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
  - composer self-update
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:dev-master ; fi

install:
  - travis_retry composer install --no-interaction
  - composer info -i

script:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer test-coverage ; fi
  - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then composer test ; fi
  - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then composer cs ; fi

after_success:
  - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer coveralls ; fi

Use `after_success` instead in TravisCI configuration.
Use `after_success` instead in TravisCI configuration.