| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | private function getAmount(OrderItemInterface $orderItem, bool $neutral): int |
||
| 43 | { |
||
| 44 | $total = array_reduce( |
||
| 45 | $orderItem->getAdjustmentsRecursively(AdjustmentInterface::TAX_ADJUSTMENT)->toArray(), |
||
| 46 | static function (int $total, BaseAdjustmentInterface $adjustment) use ($neutral) { |
||
| 47 | return $neutral === $adjustment->isNeutral() ? $total + $adjustment->getAmount() : $total; |
||
| 48 | }, |
||
| 49 | 0 |
||
| 50 | ); |
||
| 51 | |||
| 52 | return $total; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |