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