dist: trusty
sudo: false
language: php

php:
  - 7.1
  - 7.2
  - nightly

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

before_install:
  - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
  - composer self-update

install: travis_retry composer update --prefer-dist

script:
  - vendor/bin/phpcs
  - vendor/bin/phpcs tests/input --report=summary --report-file=phpcs.log; diff tests/expected_report.txt phpcs.log

jobs:
  allow_failures:
    - php: nightly

  include:
    - stage: Apply fixes
      before_script:
        - cp -R tests/input/ tests/input2/
      script: vendor/bin/phpcbf tests/input2; diff tests/input2 tests/fixed

dist: trusty
sudo: false
language: php

php:
  - 7.1
  - 7.2
  - nightly

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

before_install:
  - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
  - composer self-update

install: travis_retry composer update --prefer-dist

script:
  - vendor/bin/phpcs
  - vendor/bin/phpcs $(find tests/input/* | sort) --report=summary --report-file=phpcs.log; diff tests/expected_report.txt phpcs.log

jobs:
  allow_failures:
    - php: nightly

  include:
    - stage: Apply fixes
      before_script:
        - cp -R tests/input/ tests/input2/
      script: vendor/bin/phpcbf tests/input2; diff tests/input2 tests/fixed

Sort checked files to avoid random order
CI: Sort checked files to avoid random order
