Skip to content

Commit 4ef8619

Browse files
authored
Merge pull request #8547 from kenjis/add-phpmetrics
chore: add PhpMetrics
2 parents 4336f21 + 16cbc68 commit 4ef8619

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
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",
@@ -109,6 +110,7 @@
109110
"php-cs-fixer fix --ansi --verbose --diff --config=.php-cs-fixer.no-header.php",
110111
"php-cs-fixer fix --ansi --verbose --diff"
111112
],
113+
"metrics": "tools/phpmetrics/vendor/bin/phpmetrics --config=phpmetrics.json",
112114
"sa": "@analyze",
113115
"style": "@cs-fix",
114116
"test": "phpunit"
@@ -117,6 +119,7 @@
117119
"analyze": "Run static analysis",
118120
"cs": "Check the coding style",
119121
"cs-fix": "Fix the coding style",
122+
"metrics": "Run PhpMetrics",
120123
"test": "Run unit tests"
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)