<?xml version="1.0" encoding="UTF-8"?>
<project basedir="../../" default="preflight">
<!-- instead of phingcall sub-tasks, use an empty target with deps -->
<target name="preflight" depends="test-init,lint"/>
<target name="travisci" depends="install-dependencies,composer-lint,php-lint,test"/>
<target name="lint" depends="install-composer,composer-lint,php-lint" description="lint-check PHP and JSON" />
<target name="composer-lint" description="lint-check composer.json only">
<composerlint dir="${project.basedir}/src" file="{$project.basedir}/composer.json" />
</target>
<target name="php-lint" description="lint-check just the PHP source">
<phplint level="info">
<fileset dir="${project.basedir}/src">
<include name="**/*.php" />
</fileset>
</phplint>
<phplint level="info">
<fileset dir="${project.basedir}/tests">
<include name="**/*.php" />
</fileset>
</phplint>
</target>
<target name="sniff" description="Check code for PSR-2 compliance">
<phpcodesniffer
standard="PSR2"
format="summary" />
</target>
</project>