language: php

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

matrix:
    fast_finish: true

sudo: false

env:
    - COMPOSER_OPTS=""
    - COMPOSER_OPTS="--prefer-lowest"

before_script:
    - sh -c 'if [ $(php -r "echo (int) defined(\"HHVM_VERSION\");") -eq 0 ]; then pecl install mailparse; fi'
    - composer self-update
    - composer update $COMPOSER_OPTS

script:
    - mkdir -p build/logs
    - ./vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
    - ./vendor/bin/phpcs src --standard=psr2
    - ./vendor/bin/phpcs tests --standard=psr2

after_script:
    - ./vendor/bin/coveralls -v

language: php

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

matrix:
    fast_finish: true

sudo: false

env:
    - COMPOSER_OPTS=""
    - COMPOSER_OPTS="--prefer-lowest"

before_script:
    - if [[ "$TRAVIS_PHP_VERSION" = "php5*" ]]; then pecl install mailparse-2.1.6 ; fi
    - if [[ "$TRAVIS_PHP_VERSION" = "php7*" ]]; then pecl install mailparse ; fi
    - composer self-update
    - composer update $COMPOSER_OPTS

script:
    - mkdir -p build/logs
    - ./vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
    - ./vendor/bin/phpcs src --standard=psr2
    - ./vendor/bin/phpcs tests --standard=psr2

after_script:
    - ./vendor/bin/coveralls -v

Install mailparse according to php version
Install mailparse according to php version