Skip to content

Commit 9421894

Browse files
committed
add QA tool: phpcpd
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 22491b8 commit 9421894

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

Diff for: composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"@composer -dtools/composer-require-checker update",
7878
"@composer -dtools/composer-unused update",
7979
"@composer -dtools/php-cs-fixer update",
80+
"@composer -dtools/phpcpd update",
8081
"@composer -dtools/phpmd update",
8182
"@composer -dtools/psalm update",
8283
"@composer -dtools/infection update",
@@ -100,7 +101,8 @@
100101
"test:infection": "@php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 -d xdebug.mode=coverage -d pcov.enabled=1 -d pcov.directory=src tools/infection/vendor/infection/infection/bin/infection ",
101102
"test:phpmd": "@php tools/phpmd/vendor/phpmd/phpmd/src/bin/phpmd src ansi .phpmd.rules.dist.xml",
102103
"test:phpunit": "@php -d zend.assertions=1 -d assert.exception=1 -d display_errors=On -d error_reporting=-1 -d log_errors_max_len=0 -d memory_limit=-1 -d xdebug.mode=coverage -d pcov.enabled=1 -d pcov.directory=src vendor/phpunit/phpunit/phpunit",
103-
"test:psalm": "@php tools/psalm/vendor/vimeo/psalm/psalm"
104+
"test:psalm": "@php tools/psalm/vendor/vimeo/psalm/psalm",
105+
"test:phpcpd": "@php tools/phpcpd/vendor/sebastian/phpcpd/phpcpd --exclude src/Core/Spec/SpecFactory.php --exclude src/Core/Serialization/DOM/NormalizerFactory.php --exclude src/Core/Serialization/JSON/NormalizerFactory.php --fuzzy src"
104106
},
105107
"scripts-descriptions": {
106108
"cs-fix": "Fix files according to coding standards.",

Diff for: tools/phpcpd/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!/.gitignore
3+
!/composer.json

Diff for: tools/phpcpd/composer.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "tools/phpcpd",
3+
"description": "PHP Copy/Paste Detector",
4+
"type": "metapackage",
5+
"require-dev": {
6+
"roave/security-advisories": "dev-latest",
7+
"sebastian/phpcpd": "^6.0"
8+
},
9+
"prefer-stable": true,
10+
"config": {
11+
"allow-plugins": {
12+
"composer/package-versions-deprecated": false
13+
},
14+
"preferred-install": "dist",
15+
"sort-packages": true
16+
}
17+
}

0 commit comments

Comments
 (0)