Skip to content

Commit c37ac9d

Browse files
committed
chore: install PhpMetrics 3.0.0rc6
mkdir -p tools/phpmetrics composer require --working-dir=tools/phpmetrics phpmetrics/phpmetrics:^3.0rc6
1 parent 2968e1f commit c37ac9d

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
},
9191
"scripts": {
9292
"post-update-cmd": [
93-
"CodeIgniter\\ComposerScripts::postUpdate"
93+
"CodeIgniter\\ComposerScripts::postUpdate",
94+
"composer update --working-dir=tools/phpmetrics"
9495
],
9596
"analyze": [
9697
"Composer\\Config::disableProcessTimeout",
@@ -111,12 +112,14 @@
111112
],
112113
"sa": "@analyze",
113114
"style": "@cs-fix",
114-
"test": "phpunit"
115+
"test": "phpunit",
116+
"metrics": "tools/phpmetrics/vendor/bin/phpmetrics --config=phpmetrics.json"
115117
},
116118
"scripts-descriptions": {
117119
"analyze": "Run static analysis",
118120
"cs": "Check the coding style",
119121
"cs-fix": "Fix the coding style",
120-
"test": "Run unit tests"
122+
"test": "Run unit tests",
123+
"metrics": "Run PhpMetrics"
121124
}
122125
}

phpmetrics.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"includes": ["system"],
3+
"excludes": ["ThirdParty"],
4+
"report": {
5+
"html": "build/phpmetrics/"
6+
}
7+
}

tools/phpmetrics/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require-dev": {
3+
"phpmetrics/phpmetrics": "^3.0rc6"
4+
}
5+
}

0 commit comments

Comments
 (0)