sudo: false
language: php
php:
  - 5.3
  - 5.4
  - 5.5

notifications:
  email:
    on_success: change
    on_failure: change

before_script:
  # PHP_CodeSniffer
  - pear install pear/PHP_CodeSniffer
  - phpenv rehash
  # PHP Copy/Paste Detector
  - curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
  # PHP Mess Detector
  - pear config-set preferred_state beta
  - printf "\n\n" | pecl install imagick
  - pear channel-discover pear.phpmd.org
  - pear channel-discover pear.pdepend.org
  - pear install --alldeps phpmd/PHP_PMD
  - phpenv rehash
  # PHPLOC
  - curl -o phploc.phar https://phar.phpunit.de/phploc-2.0.6.phar
  # Basic config required for PHPUnit
  - cp qa-tests/phpunit-qa-config.php qa-config.php

script:
  # Most of this has been turned off until the code is actually close to passing
  # PHP_CodeSniffer
  #- phpcs --report=emacs --extensions=php --standard=qa-tests/phpcs/ruleset.xml .
  # PHP Mess Detector
  #- phpmd --exclude qa-include/vendor/ . text codesize
  #- phpmd --exclude qa-include/vendor/ . text unusedcode
  # PHP Copy/Paste Detector
  - php phpcpd.phar --exclude vendor .
  # PHPLOC
  - php phploc.phar .
  # PHPUnit
  - phpunit --bootstrap qa-tests/autoload.php qa-tests
