| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 8 |
| Ratio | 100 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 32 | View Code Duplication | function minus(Sums $sums) |
|
| 33 | { |
||
| 34 | $newSums = $this->sums; |
||
| 35 | foreach ($sums->sums as $currency_id => $sum) { |
||
| 36 | $newSums[$currency_id] = isset($newSums[$currency_id]) ? $newSums[$currency_id] - $sum : -$sum; |
||
| 37 | } |
||
| 38 | return new Sums($newSums); |
||
| 39 | } |
||
| 40 | |||
| 84 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.