Hello everyone!

We have been investing plenty of personal time and energy for many years to share our knowledge with you all. However, we now need your help to keep this blog running. All you have to do is just click one of the adverts on the site, otherwise it will sadly be taken down due to hosting etc. costs. Thank you.

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>