Skip to content

Conversation

zimmer-yan
Copy link

PhpMetrics v2.9.1

Description:
Fixing trends not being displayed correctly.

Current behavior:
The trends in the html report will always show the current value and a trend of minus that value.

Correct behavior:
show actual trend change

Root cause:
Hal\Report\Html\Reporter.php:255 checks for isset($this->sum->$type->$key) which will never be set, resulting in $newValue being assigned 0, causing the trend to be 0 - $oldValue.

Fix:
Changing the lookup to $this->$type->$key from $this->sum->$type->$key checks for the correct variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant