sudo: false

language:
    - php

php:
    - 5.3
    - 5.4
    - 5.5
    - 5.6

env:
  - PHPCS_BRANCH=master
  - PHPCS_BRANCH=2.2.0

matrix:
  include:
    # Run against PHPCS 3.0. I just picked to run it against 5.6.
    - php: 5.6
      env: PHPCS_BRANCH=3.0
    # Run against HHVM and PHP nightly.
    - php: hhvm
      env: PHPCS_BRANCH=master
    - php: nightly
      env: PHPCS_BRANCH=master
  allow_failures:
    # Allow failures for unstable builds.
    - php: nightly
    - php: hhvm
    - env: PHPCS_BRANCH=3.0

before_script:
    - export PHPCS_DIR=/tmp/phpcs
    - export PHPCS_BIN=$(if [[ $PHPCS_BRANCH == 3.0 ]]; then echo $PHPCS_DIR/bin/phpcs; else echo $PHPCS_DIR/scripts/phpcs; fi)
    - mkdir -p $PHPCS_DIR && git clone --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git -b $PHPCS_BRANCH $PHPCS_DIR
    - $PHPCS_BIN --config-set installed_paths $(pwd)

script:
    - find . \( -name '*.php' \) -exec php -lf {} \;
    - phpunit --filter WordPress /tmp/phpcs/tests/AllTests.php

sudo: false

language:
    - php

php:
    - 5.3
    - 5.4
    - 5.5
    - 5.6

env:
  - PHPCS_BRANCH=master
  - PHPCS_BRANCH=2.2.0

matrix:
  include:
    # Run against PHPCS 3.0. I just picked to run it against 5.6.
    - php: 5.6
      env: PHPCS_BRANCH=3.0
    # Run against HHVM and PHP nightly.
    - php: hhvm
      env: PHPCS_BRANCH=master
    - php: nightly
      env: PHPCS_BRANCH=master
  allow_failures:
    # Allow failures for unstable builds.
    - php: nightly
    - php: hhvm
    - env: PHPCS_BRANCH=3.0

before_script:
    - export PHPCS_DIR=/tmp/phpcs
    - export PHPCS_BIN=$(if [[ $PHPCS_BRANCH == 3.0 ]]; then echo $PHPCS_DIR/bin/phpcs; else echo $PHPCS_DIR/scripts/phpcs; fi)
    - mkdir -p $PHPCS_DIR && git clone --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git -b $PHPCS_BRANCH $PHPCS_DIR
    - $PHPCS_BIN --config-set installed_paths $(pwd)

script:
    - if find . -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi;
    - phpunit --filter WordPress /tmp/phpcs/tests/AllTests.php

Correct the syntax error detection
Correct the syntax error detection