Details
Description
PHPCPD suffers from limitations (it can't ignore 'use' directives for instance) and the current properties (min-lines=3 and min-tokens=5) of the plugin give too many false-positives.
To prepare a move to Sonar CPD engine (which will have an extension point for other languages with Sonar 2.14), we decided to use the Java PMD-CPD tool for duplication detection. This removes the need for PHPCPD tool, which will improve the results while making the overall install of the PHP plugin easier (1 step less).
After spending quite some time on testing several values for the 2 parameters on the Symfony framework, it turns out that the best results I could get are obtained with "min-lines=4" and "min-tokens=15".
For information :
private function addFormSection(ArrayNodeDefinition $rootNode) { $rootNode ->children() ->arrayNode('form')