Skip to content

fix trends not displayed correctly#531

Open
zimmer-yan wants to merge 1 commit intophpmetrics:masterfrom
zimmer-yan:fix/trends-not-displayed-correctly
Open

fix trends not displayed correctly#531
zimmer-yan wants to merge 1 commit intophpmetrics:masterfrom
zimmer-yan:fix/trends-not-displayed-correctly

Conversation

@zimmer-yan
Copy link
Copy Markdown

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.

2 participants