Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Detector
✓ use SebastianBergmann\PHPCPD\Detector\Detector;
Detect copy/paste code in a directory
use SebastianBergmann\PHPCPD\Detector\Detector;
$detector = new Detector();
$result = $detector->copyPasteDetection('path/to/php/files');
foreach ($result->getClones() as $clone) {
echo $clone->percentage() . '% duplicated';
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.