sudo: false

language: php

php:
  - '5.3'
  - '5.4'
  - '5.5'
  - '5.6'
  - '7.0'

notifications:
  email:
    on_success: change
    on_failure: change

before_script:
  # PHP_CodeSniffer
  - curl -o phpcs.phar https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
  # PHP Copy/Paste Detector
  - curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
  # Basic config required for PHPUnit
  - cp qa-tests/phpunit-qa-config.php qa-config.php

script:
  # PHP_CodeSniffer (turned off for now)
  #- php phpcs.phar --report=emacs --extensions=php --standard=qa-tests/phpcs/ruleset.xml .
  # PHP Copy/Paste Detector
  - php phpcpd.phar --exclude vendor .
  # PHPUnit
  - phpunit --bootstrap qa-tests/autoload.php qa-tests
