Use build entry below to create code_sniffer report.


Build.xml


<?xml version="1.0" encoding="UTF-8"?>

<project name="Sport" default="default" basedir=".">

<!-- GLOBAL VARIABLES -->
<property name="reports.folder" value="build/phing" />
<!-- END -->

<!-- FILESET -->
<fileset id="sourcecode" dir="${project.basedir}/src">
<include name="**/*.php" />
</fileset>
<!-- END -->

<!-- CODESNIFFER - PSR2 -->
<target name="test.codesniffer">
<echo msg="Running codesniffer ..." />
<tstamp />
<phpcodesniffer standard="PSR2" showWarnings="true" format="full">
<fileset refid="sourcecode" />
<formatter type="checkstyle" outfile="${reports.folder}/phpcs/${DSTAMP}-${TSTAMP}.xml" />
</phpcodesniffer>
</target>
<!-- END -->

</project>