language: php

php:
  - 5.5
  - 5.6
  - 7.0
  - 7.1
  - hhvm

matrix:
  allow_failures:
    - php: 7.1
    - php: hhvm

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

before_script:
  ## Packages
  - sudo apt-get -qq update > /dev/null
  ## Composer
  - composer self-update
  - composer install

script:
  ## PHP_CodeSniffer
  - ./vendor/bin/phpcs --report-width=200 --report-summary  --report-full src/ tests/ --standard=PSR2 -n
  ## PHPUnit
  - ./vendor/bin/phpunit
