Description
The easiest way to obtain PHPCPD is to download a PHP Archive (PHAR) that has all required dependencies of PHPCPD bundled in a single file:
PHPCPD alternatives and similar libraries
Based on the "Code Analysis" category.
Alternatively, view PHPCPD alternatives based on common mentions on social networks and blogs.
-
PHP Code Sniffer
PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards. -
phan
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness. -
PHP Mess Detector
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend. -
Better Reflection
:crystal_ball: Better Reflection is a reflection API that aims to improve and provide more features than PHP's built-in reflection API. -
PHP Semantic Versioning Checker
Compares two source sets and determines the appropriate semantic versioning to apply. -
PHPCheckstyle
PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions.
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of PHPCPD or a related project?
README
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:
$ phive install phpcpd
$ ./tools/phpcpd --version
It is not recommended to use Composer to download and install this tool.
Usage Example
$ php phpcpd.phar --fuzzy wordpress-5.5
phpcpd 6.0.0 by Sebastian Bergmann.
Found 121 clones with 8137 duplicated lines in 69 files:
- /home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core/Curve25519/H.php:19-1466 (1447 lines)
/home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core32/Curve25519/H.php:19-1466
.
.
.
- /home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core32/Curve25519.php:879-889 (10 lines)
/home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core32/Curve25519.php:1072-1082
1.82% duplicated lines out of 446676 total lines of code.
Average size of duplication is 67 lines, largest clone has 1447 of lines
Time: 00:02.980, Memory: 318.00 MB