Conditions | 4 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
50 | private function renderDifferenceWidget() |
||
51 | { |
||
52 | $diff = $this->new->subtract($this->old); |
||
53 | $diffAmount = $diff->getAmount(); |
||
54 | if ($diffAmount === 0) { |
||
55 | return ''; |
||
56 | } |
||
57 | |||
58 | return Html::tag( |
||
59 | 'span', |
||
60 | ($diffAmount > 0 ? '+' : '') . $this->formatter->format($diff), |
||
61 | ['class' => $diffAmount > 0 ? 'text-success' : 'text-danger'] |
||
62 | ); |
||
63 | } |
||
64 | |||
70 |