Skip to content

Conversation

craig-davis
Copy link
Contributor

Feature

PHP Copy Paste Detector is a QA tool that can be used to find duplicate code. This adds a new pre-commit-php hook for calling phpcpd.

Implementation

This is fairly straightforward and also follows the general pattern of php-cs-fixer. This will ONLY analyze the files that are staged for duplicate code, and not the entire project. A feature to scan the entire project could perhaps be added.

Sample Output

Sample Output

Review

This was a little rushed, and the commit to both the README and hooks files have the entries from php-md in it. This should sort itself out in the merge, but if you'd like a tidier PR, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant