language: php

php:
  - 5.4
  - 5.5
  - 5.6

matrix:
  fast_finish: true

  include:
    - php: 5.4
      env: COVERALLS=1

    - php: 5.4
      env: PHPCS=1

before_script:
  - phpenv rehash
  - sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
  - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"

install:
  - composer self-update
  - composer install --prefer-dist --no-interaction --dev

script:
  - sh -c "if [ '$PHPCS' != '1' & '$COVERALLS' != '1' ]; then phpunit; fi"

  - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p -n --extensions=php --standard=PSR2 ./src ./tests; fi"

  - sh -c "if [ '$COVERALLS' = '1' ]; then phpunit --coverage-clover build/logs/clover.xml; fi"
  - sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls -c .coveralls.yml -v; fi"

notifications:
  email: false

language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0

matrix:
  fast_finish: true

  include:
    - php: 5.6
      env: COVERALLS=1

    - php: 7.0
      env: PHPCS=1

before_script:
  - phpenv rehash
  - sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
  - sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"

install:
  - composer self-update
  - composer install --prefer-dist --no-interaction --dev

script:
  - sh -c "if [ '$PHPCS' != '1' & '$COVERALLS' != '1' ]; then phpunit; fi"

  - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p -n --extensions=php --standard=PSR2 ./src ./tests; fi"

  - sh -c "if [ '$COVERALLS' = '1' ]; then phpunit --coverage-clover build/logs/clover.xml; fi"
  - sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls -c .coveralls.yml -v; fi"

notifications:
  email: false

Add PHP7 and fix coveralls issue.
Add PHP7 and fix coveralls issue.
