Scroll to navigation

PHPCPD(1) User Commands PHPCPD(1)

NAME

phpcpd - PHPCPD command line interface

SYNOPSIS

phpcpd [options] <directory>

DESCRIPTION

Copy and paste detector (CPD) for PHP code. This tool provides details about duplicated lines inside a PHP project.

Options for selecting files:

(default: .php; can be given multiple times)
Exclude files with <path> in their path from the analysis (can be given multiple times)

Options for analysing files:

Fuzz variable names
Minimum number of identical lines (default: 5)
Minimum number of identical tokens (default: 70)
Select which algorithm to use ('rabin-karp' (default) or 'suffixtree')

--edit-distance <N> Distance in number of edits between two clones (only for suffixtree; default: 5)

--head-equality <N> Minimum equality at start of clone (only for suffixtree; default 10)

Options for report generation:

Write log in PMD-CPD XML format to <file>
March 2024 phpcpd 7.0.0~git20230110