language: php

sudo: false

env:
  global:
    - COVERALLS=0
    - PHPCS=0

matrix:
    include:
        - php: 5.3
        - php: 5.4
          env: COVERALLS=1 PHPCS=1
        - php: 5.5
        - php: 5.6
        - php: 7
        - php: hhvm
        # - php: 5.4
        # env: PHPCS=0 DEFAULT=1

    allow_failures:
        # allow failure for Php > 5.6
        - php: 7
        - php: hhvm
    fast_finish: true

install:
  composer install --prefer-source

script:
    # - sh -c "if [ '$DEFAULT' = '1' ]; then ./vendor/bin/phpunit ; fi"
    - sh -c "if [ '$COVERALLS' = '1' ]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; else ./vendor/bin/phpunit ; fi"
    - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./src ./tests ; fi"

after_script:
    - sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls ; fi"

language: php

sudo: false

env:
  global:
    - COVERALLS=0
    - PHPCS=0

matrix:
    include:
        - php: 5.3
        - php: 5.4
          env: COVERALLS=1 PHPCS=1
        - php: 5.5
        - php: 5.6
        - php: 7
        - php: hhvm
        # - php: 5.4
        # env: PHPCS=0 DEFAULT=1

    allow_failures:
        # allow failure for Php > 5.6
        - php: 7
        - php: hhvm
    fast_finish: true

install:
  composer install --prefer-source

script:
    - sh -c "if [ '$COVERALLS' = '1' ]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; else ./vendor/bin/phpunit ; fi"
    - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./src ./tests ; fi"

after_script:
    - sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls ; fi"

Remove unnecessary line in script
Remove unnecessary line in script