Skip to content

Commit df0424e

Browse files
committed
allow phpmetrics --git option
1 parent dc02532 commit df0424e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Tools/Analyzer/PhpMetricsV2.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ public function __invoke()
2020
$args['report-html'] = $this->options->toFile('phpmetrics/');
2121
$args['report-violations'] = $this->options->toFile('phpmetrics.xml');
2222
}
23+
if ($git = $this->config->value('phpmetrics.git')) {
24+
if (is_bool($git)) {
25+
$args[] = '--git';
26+
} else {
27+
$args['git'] = $git;
28+
}
29+
}
2330
$args[] = $this->options->getAnalyzedDirs(',');
2431
return $args;
2532
}

0 commit comments

Comments
 (0)