Skip to content
Copy/Paste Detector (CPD) for PHP code.
PHP
Branch: master
Clone or download

Latest commit

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Initial work on build automation May 21, 2020
.psalm Create configuration for Psalm May 21, 2020
build Housekeeping Jan 27, 2019
src Fix CS/WS issues May 21, 2020
tests Fix CS/WS issues May 21, 2020
tools Add Psalm May 21, 2020
.gitattributes Ignore tests etc. from archive exports May 4, 2020
.gitignore Housekeeping Feb 20, 2020
.php_cs.dist Update PHP-CS-Fixer configuration May 21, 2020
ChangeLog.md Prepare release Feb 22, 2020
LICENSE Housekeeping Feb 20, 2020
README.md Discourage installation using Composer even more May 18, 2020
build.xml Housekeeping Feb 20, 2020
composer.json Bump Feb 22, 2020
phive.xml Tweak May 21, 2020
phpcpd Leftover from bb7953b Sep 14, 2018
phpunit.xml Reorganize May 21, 2020

README.md

PHP Copy/Paste Detector (PHPCPD)

phpcpd is a Copy/Paste Detector (CPD) for PHP code.

Installation

This tool is distributed as a PHP Archive (PHAR):

$ wget https://phar.phpunit.de/phpcpd.phar

$ php phpcpd.phar --version

Using Phive is the recommended way for managing the tool dependencies of your project.

It is not recommended to use Composer to download and install this tool.

Usage Example

$ php phpcpd.phar --fuzzy wordpress-4.9.8
phpcpd 5.0.0 by Sebastian Bergmann.

Found 66 clones with 3014 duplicated lines in 40 files:

  - /home/sb/wordpress-4.9.8/wp-includes/Requests/IRI.php:358-708 (350 lines)
    /home/sb/wordpress-4.9.8/wp-includes/SimplePie/IRI.php:404-754
.
.
.
  - /home/sb/wordpress-4.9.8/wp-includes/SimplePie/File.php:133-144 (11 lines)
    /home/sb/wordpress-4.9.8/wp-includes/SimplePie/File.php:215-226

0.86% duplicated lines out of 349460 total lines of code.
Average size of duplication is 45 lines, largest clone has 350 of lines

Time: 1.79 seconds, Memory: 272.00MB
You can’t perform that action at this time.