Examples

<phpcpd file="path/to/source.php"/>

Checking for copy/paste code in one particular source file. Sending Default-Report to STDOUT.

<phpcpd file="path/to/source">
   <formatter type="pmd" outfile="reports/pmd-cpd.xml"/>
 </phpcpd>

Checking for copy/paste code in files of the given path.

<phpcpd>
   <fileset dir="${builddir}" id="filestocpd">
     <include name="apps/**/*.php" />
     <include name="lib/de/**/*.php" />
     <include name="lib/task/**/*.php" />
     <include name="lib/services/**/*.php" />
     <include name="lib/form/**/*.php" />
     <include name="lib/model/**/*.php" />
   </fileset>
   <formatter type="pmd" outfile="reports/pmd-cpd.xml"/>
 </phpcpd>