chore: install PhpMetrics 3.0.0rc6

mkdir -p tools/phpmetrics
composer require --working-dir=tools/phpmetrics phpmetrics/phpmetrics:^3.0rc6
This commit is contained in:
kenjis 2024-02-15 19:53:49 +09:00
parent 2968e1f1fd
commit c37ac9d828
No known key found for this signature in database
GPG Key ID: BD254878922AF198
3 changed files with 18 additions and 3 deletions

View File

@ -90,7 +90,8 @@
}, },
"scripts": { "scripts": {
"post-update-cmd": [ "post-update-cmd": [
"CodeIgniter\\ComposerScripts::postUpdate" "CodeIgniter\\ComposerScripts::postUpdate",
"composer update --working-dir=tools/phpmetrics"
], ],
"analyze": [ "analyze": [
"Composer\\Config::disableProcessTimeout", "Composer\\Config::disableProcessTimeout",
@ -111,12 +112,14 @@
], ],
"sa": "@analyze", "sa": "@analyze",
"style": "@cs-fix", "style": "@cs-fix",
"test": "phpunit" "test": "phpunit",
"metrics": "tools/phpmetrics/vendor/bin/phpmetrics --config=phpmetrics.json"
}, },
"scripts-descriptions": { "scripts-descriptions": {
"analyze": "Run static analysis", "analyze": "Run static analysis",
"cs": "Check the coding style", "cs": "Check the coding style",
"cs-fix": "Fix the coding style", "cs-fix": "Fix the coding style",
"test": "Run unit tests" "test": "Run unit tests",
"metrics": "Run PhpMetrics"
} }
} }

7
phpmetrics.json Normal file
View File

@ -0,0 +1,7 @@
{
"includes": ["system"],
"excludes": ["ThirdParty"],
"report": {
"html": "build/phpmetrics/"
}
}

View File

@ -0,0 +1,5 @@
{
"require-dev": {
"phpmetrics/phpmetrics": "^3.0rc6"
}
}