PhpMetrics
PhpMetrics copied to clipboard
JUnit config parameter docs don't match what the code actually does
Bug report
Version 2.7.4
The README.md
file includes this configuration file example of linking to a JUnit report:
"junit": {
"file": "/tmp/junit.xml"
}
However, the code in Hal\Application\Config\File\ConfigFileReaderJson
uses the key report
and not the key file
:
if (isset($jsonData['plugins'], $jsonData['plugins']['junit'], $jsonData['plugins']['junit']["report"])) {
Thus, either the README.md
should be changed to:
"junit": {
"report": "/tmp/junit.xml"
}
Or the Hal\Application\Config\File\ConfigFileReaderJson
should be changed to:
if (isset($jsonData['plugins'], $jsonData['plugins']['junit'], $jsonData['plugins']['junit']["file"])) {
I did not create a pull request for this change as I don't know which of these two keys was intended and it's trivial enough to implement.
Thanks for the report. This will be fixed with https://github.com/phpmetrics/PhpMetrics/pull/457