sudo: false
language: php

php:
    - 5.4
    - 5.5
    - 5.6
    - 7.0
    - 7.1
    - 7.2

env:
    - PHPCS_VERSION='~2.0'
    - PHPCS_VERSION='~2.0@dev'

matrix:
    exclude:
        - php: 5.5
          env: PHPCS_VERSION='~2.0@dev'
        - php: 5.6
          env: PHPCS_VERSION='~2.0@dev'
        - php: 7.0
          env: PHPCS_VERSION='~2.0@dev'
        - php: 7.1
          env: PHPCS_VERSION='~2.0@dev'

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

before_script:
    - composer require squizlabs/php_codesniffer:$PHPCS_VERSION --prefer-source

script:
    - mkdir -p build/logs
    - vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_script:
    - wget https://scrutinizer-ci.com/ocular.phar -t 3
    - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

after_success:
  - bash <(curl -s https://codecov.io/bash)

sudo: false
language: php

php:
    - 5.4
    - 5.5
    - 5.6
    - 7.0
    - 7.1
    - 7.2

env:
    - PHPCS_VERSION='^3.3'
    - PHPCS_VERSION='^3.3@dev'

matrix:
    exclude:
        - php: 5.5
          env: PHPCS_VERSION='^3.3@dev'
        - php: 5.6
          env: PHPCS_VERSION='^3.3@dev'
        - php: 7.0
          env: PHPCS_VERSION='^3.3@dev'
        - php: 7.1
          env: PHPCS_VERSION='^3.3@dev'

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

before_script:
    - composer require squizlabs/php_codesniffer:$PHPCS_VERSION --prefer-source

script:
    - mkdir -p build/logs
    - vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_script:
    - wget https://scrutinizer-ci.com/ocular.phar -t 3
    - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

after_success:
  - bash <(curl -s https://codecov.io/bash)

Use PHPCS 3.x during builds
Use PHPCS 3.x during builds
