Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
This package has been abandoned.
Generated on May 19, 2024 via composer

sebastian/phpcpd 6.0.3

Copy/Paste Detector (CPD) for PHP code.
Package summary
Share
1
issue
1
high severity
meta
1
1
license
5
BSD-3-Clause
Package created
5 Apr 2013
Version published
7 Dec 2020
Maintainers
1
Total deps
5
Direct deps
4
License
BSD-3-Clause

Issues

1

1 high severity issue

high
via: sebastian/phpcpd@6.0.3
Collapse
Expand

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
5 Packages, Including:
phpunit/php-file-iterator@3.0.6
phpunit/php-timer@5.0.3
sebastian/cli-parser@1.0.2
sebastian/phpcpd@6.0.3
sebastian/version@3.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

4
All Dependencies CSV
β“˜ This is a list of sebastian/phpcpd 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
phpunit/php-file-iterator3.0.68.05 kBBSD-3-Clause
prod
phpunit/php-timer5.0.39.68 kBBSD-3-Clause
prod
sebastian/cli-parser1.0.2-BSD-3-Clause
prod
sebastian/version3.0.24.76 kBBSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does sebastian/phpcpd do?

Sebastian/phpcpd, also known as PHP Copy/Paste Detector (PHPCPD), is an SEO-friendly tool that identifies duplicate and redundant PHP code in your software projects. It is a Copy/Paste Detector (CPD) specifically tailored for PHP, efficiently helping to maintain code integrity by detecting and highlighting copied and pasted blocks of codes in PHP projects.

How do you use sebastian/phpcpd?

Using Sebastian Bergmann's PHPCPD is straightforward. The tool is distributed as a PHP Archive (PHAR). You can use the wget command in your terminal to download the PHPCPD tool as follows:

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

To verify that the tool is installed correctly, you can check its version using this command:

$ php phpcpd.phar --version

Sebastian's PHP Copy/Paste Detector is recommended to be managed with Phive, which further streamlines dependency management for your project:

$ phive install phpcpd

$ ./tools/phpcpd --version

The copied code within your project can be detected by running the following command:

$ php phpcpd.phar --fuzzy your_directory_name

This command conducts a fuzzy search within the specified directory and will return results indicating the number of clones found, the number of duplicated lines, and the files containing the duplicated code.

On running these commands, it is important to replace "your_directory_name" with the name of the directory you want to be evaluated for copied code.

Where are the sebastian/phpcpd docs?

The official documentation for PHPCPD is not explicitly mentioned in the README, however given it is a project started by Sebastian Bergmann, you could likely find pertinent information and documentation on his GitHub page (https://github.com/sebastianbergmann) or on the official PHPUnit documentation website (https://phpunit.de/), as PHPUnit and PHPCPD share the same author.