Gulp plugin for running PHP Copy/Paste Detector (PHPCPD)
npm install gulp-phpcpd> Gulp plugin for running PHP Copy/Paste Detector (PHPCPD)
```
$ npm install --save-dev gulp-phpcpd
`js
var gulp = require('gulp');
var phpcpd = require('gulp-phpcpd');
gulp.task('default', function () {
return gulp.src('/path/to/src//*.php')
.pipe(phpcpd());
});
`
#### options
##### bin
Type: stringphpcpd
Default:
The binary name if it is in your path or the full path if not.
##### exclude
Type: stringfalse
Default:
Exclude
from code analysis. Also supports array syntax for excluding multiple directories.##### minLines
Type:
number
Default: 5Minimum number of identical lines.
##### minTokens
Type:
number
Default: 70The binary name if it is in your path or the full path if not.
##### names
Type:
string
Default: *.phpA comma-separated list of file names to check.
##### namesExclude
Type:
string
Default: falseA comma-separated list of file names to exclude.
##### quiet
Type:
boolean
Default: falseOnly print the final summary.
##### reportFile
Type:
string
Default: falseSet a path and filename here to write to a file, otherwise it will write to stdout.
##### verbose
Type:
boolean
Default: false`Print duplicated code.
MIT © Fredrik Forsmo