| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function getTotalRefundedForPayment(Payment $payment): Money |
||
| 46 | { |
||
| 47 | $refunds = $this->getForPayment($payment); |
||
| 48 | |||
| 49 | $amount = Money::of(0, Currency::of($payment->getCurrency())); |
||
| 50 | |||
| 51 | foreach ($refunds as $refund) { |
||
| 52 | $amount = $amount->plus($refund->getAsMoney()); |
||
| 53 | } |
||
| 54 | |||
| 55 | return $amount; |
||
| 56 | } |
||
| 58 |