PHPCPD(1)
π PHPCPD(1) β User Commands π
okay bestie, sit down, hydrate, because today we're talking about phpcpd β the PHPCPD command line interface, and she is that girl. it's a User Commands situation, iykyk. β¨
πΈ NAME πΈ
phpcpd β literally the PHPCPD command line interface. that's it, that's the name, no notes. π
π¦ SYNOPSIS π¦
phpcpd [options] <directory>
like... you give her options, you give her a directory, she does her thing. periodt. π
π DESCRIPTION π
so what is this? it's a Copy and paste detector (CPD) for PHP code, no cap. this tool gives you the tea β the details β about duplicated lines inside a PHP project. she's the friend who notices you wore the same fit twice, except it's your codebase and the receipts are in the terminal. π
lowkey iconic. highkey essential. π
π Options for selecting files
these are the "who's invited to the party" options, bestie.
--suffix <suffix>β include files with names ending in <suffix> in the analysis. default is.php, and yes you can pass it multiple times if you're feeling extra. β¨--exclude <path>β exclude files with <path> in their path from the analysis. also can be given multiple times, because sometimes you gotta say "not you, not today." π
π§ Options for analysing files
now we get into the actual detective work. π
--fuzzyβ fuzz variable names. that's the whole vibe, fr fr.--min-lines <N>β minimum number of identical lines. default: 5.--min-tokens <N>β minimum number of identical tokens. default: 70.
β Options for report generation
you want receipts? she got receipts. π
--log-pmd <file>β write log in PMD-CPD XML format to <file>. slay.
π reminder bestie: every single one of those flags is exactly what it says on the tin. don't go inventing new ones, don't go skipping any. we keep it accurate in this group chat.
π«Ά cute sign-off π«Ά
this lil masterpiece is from phpcpd 6.0.3, dated July 2022 β so if you're citing her, cite her right. π go forth, find those duplicated lines, and tell your codebase to stop copy-pasting. no cap. πβ¨π¦
π¦ where this page comes from
- debian bookworm: phpcpd 6.0.3-2 Β· BSD-3-Clause
- ubuntu noble: phpcpd 6.0.3-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms